1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00
gitfolio/run.js
Kaustubh Ladiya ee3ccb26ab
Removed xo
2020-01-12 15:08:32 +05:30

22 lines
520 B
JavaScript

const path = require("path");
const express = require("express");
const outDir = path.resolve("./dist/" || process.env.OUT_DIR);
const app = express();
app.use(express.static(`${outDir}`));
function runCommand(program) {
const port = program.port ? program.port : 3000;
app.get("/", (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
};