While it's recommended to run webpack-dev-server via the CLI, you may also
choose to start a server via the API. This example demonstrates using one of the
few custom middleware options; before.
node server.js- Open
http://localhost:8080/in your preferred browser. - You should see the text on the page itself change to read
Success!. - In the console/terminal, you should see the following for each refresh in the browser:
Using middleware for /
Using middleware for /bundle.js