express-refresh-use

0.0.9 • Public • Published

Express-Refresh-Use

Update app.router stack by new routes before use.

How to install

npm i -S express-refresh-use

How to use

const express = require('express');
const app = express();
const refreshUse = require('express-refresh-use');

app.get('/lala', (req, res) => {
  res.send('lala');
});

router = express.Router();

router.get('/lala', (req, res) => {
  res.send('lolo');
})

refreshUse(app, router, '/');

app.listen('3000', () => {
  console.log('Listening');
});

Then when you launch a curl :

curl http://localhost:3000/lala

-> lolo

Package Sidebar

Install

npm i express-refresh-use

Weekly Downloads

0

Version

0.0.9

License

MIT

Unpacked Size

5.67 kB

Total Files

6

Last publish

Collaborators

  • aluzed