This repository contains demo of hot-reload server, based on server-sent events (SSE). This demo show the same approach, which was implemented in The Error Pages tool.
The diagram below shows the data flow and explains in general terms how it works:
Here you can find the hot-reload examples under Express and Koa servers.
Served files are located in src
directory and can be edited to see how the hot-reload works. You can edit, add or remove files in this directory.
Before server run, please install required dependencies with npm install
command.
Use npm run express-server
command to run express-server with custom middlewares.
Use npm run koa-server
command to run koa-server with custom middlewares.