0078cb5e6d0cb2a1364ec8a145f21f6a486bf241
1 const path
= require('path'),
2 finalhandler
= require('finalhandler'),
3 http
= require('http'),
4 serveStatic
= require('serve-static');
6 const PORT
= process
.env
.PORT
|| 3030,
7 uiPath
= path
.join(__dirname
, './dist');
9 const serve
= serveStatic(uiPath
);
11 const server
= http
.createServer(function onRequest(req
, res
) {
12 serve(req
, res
, finalhandler(req
, res
));
15 server
.listen(PORT
, () => console
.info(`App running at: http://localhost:${PORT}`));