Commit | Line | Data |
---|---|---|
32de5a57 LM |
1 | const path = require('path'), |
2 | finalhandler = require('finalhandler'), | |
3 | http = require('http'), | |
4 | serveStatic = require('serve-static'); | |
5 | ||
6 | const PORT = process.env.PORT || 3030, | |
efdd1922 | 7 | uiPath = path.join(__dirname, './dist'); |
32de5a57 LM |
8 | |
9 | const serve = serveStatic(uiPath); | |
10 | ||
11 | const server = http.createServer(function onRequest(req, res) { | |
12 | serve(req, res, finalhandler(req, res)); | |
13 | }); | |
14 | ||
efdd1922 | 15 | server.listen(PORT, () => console.info(`App running at: http://localhost:${PORT}`)); |