refactor: do not poll on web deploy

This commit is contained in:
jimmylee 2020-06-22 04:44:28 -07:00
parent 271011b131
commit 1ea650e91d

View File

@ -310,7 +310,7 @@ app.prepare().then(async () => {
});
server.get('/', async (req, res) => {
if (production || !state.token) {
if (!state.token) {
return res.redirect('/system');
}
@ -332,6 +332,8 @@ app.prepare().then(async () => {
console.log(`[ prototype ] client: http://localhost:${port}`);
console.log(`[ prototype ] constants:`, Constants);
await setIntervalViewerUpdatesUnsafe();
if (!production) {
await setIntervalViewerUpdatesUnsafe();
}
});
});