1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00
gitfolio/run.js
Vitor "Pliavi" Silvério 1de7fd23ef Setting line endings to unix-style (#95)
* Add gitattributes settings to LF
* TY @Pliavi 
* Converting all CRLF to LF
2019-11-17 07:57:32 +05:30

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
};