
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
express-conductor
Advanced tools
A library for moving your express routes/controllers out of your app file.
A library for moving your express routes/controllers out of your app file.
##Usage:
Require express-conductor and after configuring your app file, pass it in detailing the location of your routes and controllers.
var expressConductor = require('express-conductor');
/*
* Normal express setup...
*/
expressConductor.init(app, {controllers: __dirname + '/controllers'}, function(err, app){
http.createServer(app).listen(PORT, function(){
console.log("Express server listening on port " + PORT);
});
});
Inside your routes/controllers folder you can structure your files however you want. Express-conductor will traverse folders and grab any file. You can have a simple file layout
controllers
├── index.js
└── posts.js
Or you can have a nested structure to imitate actions
controllers
├── Posts
| ├── show.js
| ├── create.js
| └── etc...
└── Comments
├── show.js
├── create.js
└── etc...
Express-conductor will grab them all. Just expose an init function and define your routes accordingly.
module.exports.init = function(app){
app.get('/posts/:id', showPost);
};
function showPost(req, res){
//Show post
}
##Testing
Be sure to install the dev dependencies and just run npm test
##License MIT
FAQs
A library for moving your express routes/controllers out of your app file.
We found that express-conductor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.