achievements_project/frontend/static_server.js

14 lines
341 B
JavaScript
Raw Normal View History

2021-02-05 09:59:17 +00:00
const express = require('express');
const morgan = require('morgan' );
2021-01-27 19:35:09 +00:00
const config = require('./config.js').load(process.argv[2]);
if (config.build === 'debug') {
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
}
2021-01-27 19:35:09 +00:00
const app = express();
app.use("/", morgan("dev"));
app.use("/", express.static("webpage"));
app.listen(config.port);