View Code? Open in Web Editor
NEW
cool routing/autoloading library for express.
Home Page: https://www.npmjs.com/package/express-map2
express-map's Introduction
- ๐ Hi, Iโm @r3wt
- ๐ Iโm interested in React, Typescript, Rust, Scala, C++
- ๐ฑ Iโm currently learning Unreal Engine 5
- ๐๏ธ Iโm looking to collaborate on Open Source Projects
- ๐ซ How to reach me [email protected]
express-map's People
Contributors
Stargazers
express-map's Issues
|
if(!(middleware instanceof Array)){ |
I'm suprised it actually still works. should be replaced with _self, since _self is the express app in the calling scope.
Strings should be trimmed on both sides of each parsed item.
- parsing string global middleware. currently only function middleware are able to be used.
currently supported
var Middleware = require('controllers/Middleware');
app.map('/api/v1/test', Middlewarer.parseJWT, Middleware.isUser, {
'GET /user':'User.loadOne'
});
proposed support
app.map('/api/v1/test', 'Middlewarer.parseJWT, Middleware.isUser', {
'GET /user':'User.loadOne'
});
- support comma seperated http methods. make sure to prevent duplicate handlers.
currently supported
app.map('/api/v1/test',{
'GET /:id':'Test.get',
'POST /:id':'Test.create',
'PUT /:id':'Test.update',
'Delete /:id':'Test.delete'
});
proposed support
app.map('/api/v1/test',{
'GET, POST, PUT, DELETE /:id':'Test.crud'
});
|
let cPath = false;//cache controller path |
I'd have to check but i believe because of block scoping of let
this is potentially creating a global cPath
variable.