Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
thinknodejs
Advanced tools
ThinkNode 是一款使用 ES6/7 特性全新开发的 Node.js MVC 框架,使用 async/await 或者 Promise 解决了 Node.js 中异步嵌套的问题,让开发 Node.js 项目更加简单、高效。
src/Admin/Controller/Index.js
export default class extends THINK.Controller {
//构造方法
init(http){
//调用父类构造方法
super.init(http);
this.model = THINK.model('Home/User', {});
}
//控制器默认方法
async indexAction () {
let userInfo = await this.model.where({id: 1}).find();
this.set('userInfo', userInfo);
return this.display();
}
}
src/Admin/Controller/Index.js
export default class extends THINK.Controller {
//构造方法
init(http){
//调用父类构造方法
super.init(http);
this.model = THINK.model('Home/User', {});
}
//控制器默认方法
indexAction () {
return this.model.where({id: 1}).find().then(userInfo => {
this.set('userInfo', userInfo);
return this.display();
}).catch(e => {
return this.error(e.message);
});
}
}
https://www.gitbook.com/book/richenlin/thinknode3-doc/
webstorm代码提示插件: File --> Import Settings 选择 /node_modules/thinknode/doc/webstrom_thinknode_settings.jar
请参考ThinkNode 3.0 文档"升级"章节进行升级
https://www.gitbook.com/book/richenlin/thinknode-doc/
npm install -g thinknode_kit
thinknode new project_name
npm install
npm start
打开浏览器,访问http://localhost:3000
richenlin richerdlee lsliangshan
MIT
FAQs
A Node.js MVC framework used new ES6/7 features. Write Less, Do More.
The npm package thinknodejs receives a total of 2 weekly downloads. As such, thinknodejs popularity was classified as not popular.
We found that thinknodejs 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.