
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@ntlab/express-middleware
Advanced tools
Nodejs Express Middleware is a set of middlewares build for Expressjs aimed at:
block and slot helper).script, scripts, javascripts, stylesheets, and jsloader helper).menu helper).pager helper).user helper).Here is a typical usage in Expressjs app.
// app.js
const { ScriptManager, ScriptAsset } = require('@ntlab/ntjs');
const { Helper, Security } = require('@ntlab/express-middleware');
// register script repository
require('@ntlab/ntjs-repo')();
// security
app.use(Security.core({}));
// app helpers
app.use(Helper.core());
app.use(Helper.menu());
app.use(Helper.pager());
ScriptManager.addDefault('SemanticUI');
ScriptManager.addAsset(ScriptAsset.STYLESHEET, 'app.css');
// relative from layout
app.slots = {
mainmenu: {
view: '../slot/mainmenu'
}
};
<%# mainmenu.ejs %>
<% menus = {
branding: {
type: 'brand',
title: apptitle,
logo: '/images/logo.png',
url: '/'
},
tasks: {
title: 'Tasks',
class: 'right floated',
items: {
about: {
title: 'About'
}
}
}
} %>
<% if(user.authenticated) {
Object.assign(menus.tasks.items, {
divider1: {
type: 'divider'
},
profile: {
title: 'Profile'
}
});
} %>
<%- menu(menus, {mainmenu: true, indentation: 2}) %>
<% script.create('JQuery')
.useDependencies(['SemanticUI/Dialog/Message'])
.addMiddle(`
$.tasks = {
about() {
$.ntdlg.message('task-about', 'About', 'About App Message', $.ntdlg.ICON_INFO);
},
profile() {
$.ntdlg.message('task-profile', 'Howdy', 'Welcome User', $.ntdlg.ICON_INFO);
},
init() {
const self = this;
$('.menu-about').on('click', function(e) {
e.preventDefault();
self.about();
});
$('.menu-profile').on('click', function(e) {
e.preventDefault();
self.profile();
});
}
}
`).addLast(`
$.tasks.init();
`); %>
Nodejs Express Middleware is heavily used by NODE-SMS-TERMINAL and NODE-SMS-GATEWAY.
FAQs
Nodejs Express Middleware
We found that @ntlab/express-middleware demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.