mirror of
https://github.com/dilllxd/gitfolio.git
synced 2024-08-14 22:28:09 +00:00
1de7fd23ef
* Add gitattributes settings to LF * TY @Pliavi * Converting all CRLF to LF
22 lines
523 B
JavaScript
22 lines
523 B
JavaScript
const express = require("express");
|
|
const path = require("path");
|
|
const outDir = path.resolve("./dist/" || process.env.OUT_DIR);
|
|
const app = express();
|
|
app.use(express.static(`${outDir}`));
|
|
|
|
function runCommand(program) {
|
|
let port = program.port ? program.port : 3000;
|
|
|
|
app.get("/", function(req, res) {
|
|
res.sendFile("/index.html");
|
|
});
|
|
|
|
app.listen(port);
|
|
console.log(
|
|
`\nGitfolio running on port ${port}, Navigate to http://localhost:${port} in your browser\n`
|
|
);
|
|
}
|
|
|
|
module.exports = {
|
|
runCommand
|
|
};
|