A simple demo show you add Hot Module Replacement to your project by Nodejs

method 1: webpack-dev-server

node ./dev-server.js

method 2: webpack-dev-middleware + webpack-hot-middleware + express

node ./dev-server2.js