feat(cli-serve): improve remote configs (#245)

This commit is contained in:
Miralem Drek
2019-12-18 19:03:45 +01:00
committed by GitHub
parent 5b4ea46725
commit a08cf8ccd8
15 changed files with 358 additions and 186 deletions

View File

@@ -15,6 +15,7 @@ module.exports = async ({
enigmaConfig,
webIntegrationId,
snName,
snUrl,
dev = false,
open = true,
entryWatcher,
@@ -74,7 +75,9 @@ module.exports = async ({
before(app) {
app.use(snapshotRoute, snapRouter);
entryWatcher.addRoutes(app);
if (entryWatcher) {
entryWatcher.addRoutes(app);
}
app.get('/themes', (req, res) => {
const arr = themes.map(theme => theme.key);
@@ -96,9 +99,10 @@ module.exports = async ({
webIntegrationId,
supernova: {
name: snName,
url: snUrl,
},
sock: {
port: entryWatcher.port,
port: entryWatcher && entryWatcher.port,
},
themes: themes.map(theme => theme.key),
});