diff --git a/server.js b/server.js index ec7259e7..e9fdb9b0 100755 --- a/server.js +++ b/server.js @@ -16,13 +16,16 @@ const blockList = Object.keys(syncloungeSocket.defaultConfig); const appConfig = config.get(null, blockList); console.log(appConfig); +const preStaticInjection = (router) => { + // Add route for config + router.get('/config.json', (req, res) => { + res.json(appConfig); + }); +}; + const socketConfig = syncloungeSocket.getConfig(); -const router = syncloungeSocket.socketServer({ +syncloungeSocket.socketServer({ ...socketConfig, static_path: 'dist', -}); - -// Add route for config -router.get('/config.json', (req, res) => { - res.json(appConfig); + preStaticInjection, });