
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
Next generation full-stack JavaScript open source solution, based on Express.Artwork by i5ting.
more
[sudo]npm install --save base2
var app = require('base2')({
// debug: true,
root:__dirname,
"views": "views",
"routes": "routes2",
"public": "public",
})
// console.log(app);
// app.mount_routes(__dirname + '/routes2');
// app.mount_plugins(__dirname + '/plugins');
app.start(3019);
Note:
more detail see https://github.com/i5ting/base2-examples
var cfg = {
debug: false,
favicon: 'favicon.ico',
favicon_enable: false,
post_enable: true,
cookie_enable: true,
log_enable: true,
log_level: "dev",
post_limit_size : '100kb',
// "views": "views",
// "routes": "routes",
// "public": "public",
pre: function (app) {
if (app.debug) {
console.log('pre hook');
}
},
post: function (app) {
if (app.debug) {
console.log('post hook');
}
}
}
默认的root是相对于安装的node_modules路径的上级
比如当前路径是base2-examples/node_modules/base2
root = base2-examples/
already exist middlewares
write a middleware by yourself:
module.exports = function (app) {
if (app.debug) {
console.log(app.get('views'));
}
if (app.get('views')) {
app.set('views', app.get('views'));
app.set('view engine', 'jade');
}
};
in app.js
app.mount_plugin('xxxx_plugins_dir');
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)i5ting i5ting@126.com如有建议或意见,请在issue提问或邮件
this repo is released under the MIT License.
FAQs
base2
We found that base2 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.