package: move html assets to src/
This commit is contained in:
parent
96dcb50177
commit
d85d8fb7f0
5 changed files with 6 additions and 0 deletions
2
app/client/.gitignore
vendored
Normal file
2
app/client/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
2
app/launcher/.gitignore
vendored
Normal file
2
app/launcher/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
|
|
@ -23,6 +23,7 @@ var urlparser = require('url'),
|
|||
ipc = new Ipc(server),
|
||||
theme = require('./theme').init(),
|
||||
zeroconf = require('./zeroconf'),
|
||||
prod = !process.argv[0].includes('node_modules'),
|
||||
osc = {},
|
||||
clients = {},
|
||||
httpCheckTimeout
|
||||
|
|
@ -77,6 +78,7 @@ function httpRoute(req, res) {
|
|||
|
||||
} else if (/^\/(assets|client)\//.test(url)){
|
||||
|
||||
if (prod) res.setHeader("Cache-Control", "public, max-age=2592000");
|
||||
res.sendFile(path.resolve(__dirname + '/..' + url))
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue