0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 04:22:40 +00:00

Merge pull request #3134 from naturalcrit/AwaitBuildCompleteBeforeStartServer

Fix issues starting server first time in Dev environment
This commit is contained in:
Trevor Buckner
2023-11-08 16:38:08 -05:00
committed by GitHub

View File

@@ -154,14 +154,14 @@ fs.emptyDirSync('./build');
// build(bundles); // build(bundles);
// //
})().catch(console.error); //In development, set up LiveReload (refreshes browser), and Nodemon (restarts server)
if(isDev){
//In development, set up LiveReload (refreshes browser), and Nodemon (restarts server)
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
watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here
ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts
ext : 'js json' // Extensions to watch (only .js/.json by default) ext : 'js json' // Extensions to watch (only .js/.json by default)
//watch : ['./server', './themes'], // Watch additional folders if needed //watch : ['./server', './themes'], // Watch additional folders if needed
}); });
} }
})().catch(console.error);