theming: send themes directly through http requests
This commit is contained in:
parent
298ac51f67
commit
63a96e1c58
4 changed files with 7 additions and 14 deletions
|
|
@ -13,7 +13,12 @@ express.get('/', function(req, res){
|
|||
res.sendFile(path.resolve(__dirname + '/../browser/index.html'))
|
||||
})
|
||||
express.get('*', function(req, res){
|
||||
res.sendFile(path.resolve(__dirname + '/../browser' + req.path))
|
||||
if (req.path.indexOf('theme.css') != -1 && settings.read('theme')) {
|
||||
res.set('Content-Type', 'text/css');
|
||||
res.send(new Buffer(settings.read('theme')))
|
||||
} else {
|
||||
res.sendFile(path.resolve(__dirname + '/../browser' + req.path))
|
||||
}
|
||||
})
|
||||
|
||||
server.listen(settings.read('httpPort'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue