
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A router middleware for easywee. Convention over Configuration
npm install wee-router --save
const router = require('wee-router');
const app = require('koa')();
app.use(router({
routes: './routes.js' // routes table defination file
}));
app.listen(5000);
Then define route in the routes.js file
module.exports = [
"get /login => accounts#login",
"get /logout => accounts#logout",
//rest api
"get /posts", //get all posts
"get /posts/:id", //get a post using id :id, such as "/posts/211" will get a parameter id=211
"post /posts", //create a post
];
We recommend using .js file to define routing information, because you can use the comments to describe the route in .js file . Also you can define the routing table using .json file.
Route data will be stored at
ctx.routein every request, and route params will be stored atctx.paramsorctx.request.params
Default options (As convention)
{
cwd: process.cwd(),
routes: 'config/routes.json'
}
cwd current working directoryroutes routes table defination file, relative to cwdFAQs
A router middleware for wee.
We found that wee-router 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.