
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
koa-mvcrouter
Advanced tools
koa2 mvc 路由
npm i koa-mvcrouter -S
const mvcrouter = require('koa-mvcrouter');
app.js中
app.use(mvcrouter.load());
controllers存放路由(控制器),views 存放视图,views/_layout 存放布局页 自动匹配views目录下于controller同名目录下action同名的视图 自动匹配_layout目录下default.ejs
project
node_modules
controllers
test.js
views
_layout
default.ejs
default.h5.ejs
test.ejs
const mvcrouter = require('../modules/koa-mvcrouter');
mvcrouter.viewGET('/', function (ctx) {
return {
title: '这是一个GET视图响应'
};
});
mvcrouter.viewGET('/uv', function (ctx) {
return {
title: '这这里自定义test布局'
};
}, null, '', 'test');
mvcrouter.viewGET('/rest/:id/:name', function (ctx) {
return {
title: 'RESTful GET action',
content: '自定义视图和布局页'
};
}, null, 'users/index', 'test');
mvcrouter.jsonPOST('/json', function (ctx) {
return {
title: 'json test',
reqData: ctx.request.body
};
});
mvcrouter.jsonPUT('/rest', async function (ctx) {
return {
res: 'RESTful PUT action',
reqData: ctx.request.body
};
});
mvcrouter.jsonDELETE('/rest/:id', async function (ctx) {
return {
res: 'RESTful DELETE action',
id: ctx.params.id,
reqData: ctx.request.body
};
});
mvcrouter.textGET('/text', function (ctx) {
return 'aaaaabbbb111xxx';
});
module.exports = mvcrouter;
FAQs
koa2 mvc 路由
The npm package koa-mvcrouter receives a total of 2 weekly downloads. As such, koa-mvcrouter popularity was classified as not popular.
We found that koa-mvcrouter 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.