-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.js
40 lines (32 loc) · 1.04 KB
/
setup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const path = require('path');
const eStatic = require('express').static;
const clientMount = require('../client-mount/index.js');
function setup(app /*, webpackDevServer */){
clientMount(app,
eStatic,
{
cdn: false,
clientVersion: 'dev',
CORS: 'https://192.168.56.101:3000',
_devlrClientJs: '/dist/lr-client.js',
localunpkgdir: path.join(__dirname, 'node_modules'),
_devFilePkgMask: {
"@linux-remote/open-icon": {
filePath: path.join('../open-icon/icons/')
}
}
});
// setTimeout(function(){
// // server.listeningApp eq http server.
// wsHandle(webpackDevServer.listeningApp);
// });
app.get('/favicon.ico', (req, res) => {
res.set({
'Cache-Control': 'public, max-age=91104000'
});
res.status(410).end('Gone');
});
// dev
app.use('/dist', eStatic(path.join(__dirname, 'dist')));
};
module.exports = setup;