express-parameter-rewriter
v1.1.0
Published
[](https://travis-ci.org/Sly321/express-parameter-rewriter) [
app.use(parameterRewriter({ hello: 'bye' })) // usage
app.use((req, res, next) => {
console.log(req.url)
console.log(req.originalUrl)
console.log(req.query)
next()
})
app.listen(3000, '0.0.0.0', () => {
console.log('Listening on localhost:3000')
})If you call http://localhost:3000/?hello=world (Tools like Insomnia, VSCode Extension Rest Client or any other restclient will do the job), the app will log:
/?bye=world
/?bye=world
{ bye: "world" }