-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
20 lines (16 loc) · 640 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Usage: npm start
// Used for local serving and quick dev/testing of the prebuilt files.
// For heavy development, you should instead use the `npm run dev` command
// under the lex-web-ui dir
const express = require('express');
const path = require('path');
const port = process.env.PORT || 8000;
const publicPath = '/';
const distDir = path.join(__dirname, 'dist');
const configDir = path.join(__dirname, 'src/config');
const app = express();
app.use(publicPath, express.static(configDir));
app.use(publicPath, express.static(distDir));
app.listen(port, function () {
console.log(`App listening on: http://localhost:${port}`);
});