Add note comment on hot module reloading

This commit is contained in:
Tom Russell 2019-04-27 13:25:08 +01:00
parent a04aed0d67
commit b997c4dce4

View File

@ -2,9 +2,11 @@
* Load server and listen * Load server and listen
* *
*/ */
import app from './server';
import http from 'http'; import http from 'http';
import app from './server';
const server = http.createServer(app); const server = http.createServer(app);
let currentApp = app; let currentApp = app;
@ -17,6 +19,7 @@ server.listen(process.env.PORT || 3000, error => {
console.log('🚀 started'); console.log('🚀 started');
}); });
// In development mode, enable hot module reloading (HMR)
if (module.hot) { if (module.hot) {
console.log('✅ Server-side HMR Enabled!'); console.log('✅ Server-side HMR Enabled!');