express-hot-reload-dev
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    express-hot-reload-dev Build Status npm

    hot reload for express

    how to use

    demo 0 | demo 1

    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

    Install

    npm i express-hot-reload-dev

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    26 kB

    Total Files

    24

    Last publish

    Collaborators

    • bibbychung