From b997c4dce413892597a6ef1d86646b72bf534abd Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Sat, 27 Apr 2019 13:25:08 +0100 Subject: [PATCH] Add note comment on hot module reloading --- app/src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/index.js b/app/src/index.js index a31d2560..ae7da7f1 100644 --- a/app/src/index.js +++ b/app/src/index.js @@ -2,9 +2,11 @@ * Load server and listen * */ -import app from './server'; import http from 'http'; +import app from './server'; + + const server = http.createServer(app); let currentApp = app; @@ -17,6 +19,7 @@ server.listen(process.env.PORT || 3000, error => { console.log('🚀 started'); }); +// In development mode, enable hot module reloading (HMR) if (module.hot) { console.log('✅ Server-side HMR Enabled!');