0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-18 05:42:48 +00:00

Should fix issues starting server first time

Using `node scripts/buildHomebrew.js --dev` can sometimes start up the server before the build is complete, so `ssr.js` is not quite ready and the app crashes. This puts the server startup inside the async block to it must await everything else being complete.
This commit is contained in:
Trevor Buckner
2023-11-08 12:18:51 -05:00
parent ce946bda98
commit 4bda071742

View File

@@ -154,8 +154,6 @@ fs.emptyDirSync('./build');
// build(bundles); // build(bundles);
// //
})().catch(console.error);
//In development, set up LiveReload (refreshes browser), and Nodemon (restarts server) //In development, set up LiveReload (refreshes browser), and Nodemon (restarts server)
if(isDev){ if(isDev){
livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser
@@ -165,3 +163,5 @@ if(isDev){
//watch : ['./server', './themes'], // Watch additional folders if needed //watch : ['./server', './themes'], // Watch additional folders if needed
}); });
} }
})().catch(console.error);