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:
@@ -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);
|
||||||
Reference in New Issue
Block a user