express-hot-reload-dev
v1.0.0
Published
hot reload for express
Downloads
3
Maintainers
Readme
express-hot-reload-dev
hot reload for express
how to use
import exp from 'express';
import { hotReload } from 'express-hot-reload-dev';
const app = exp();
const hotReloadMiddle = hotReload(`${__dirname}`, false);
const routePaths = [
'/routes/router01'
];
for (const item of routePaths) {
const routePath = `${__dirname}${item}`;
app.use(hotReloadMiddle(routePath));
}
app.listen(3000, ()=>{
console.log('Listening on 3000');
});
workspace
docker run --rm -it \
-w /app \
-v $(pwd):/app \
-p 9000:9000 \
node:12.14-alpine /bin/sh
run test
npm i
npm run test