
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
express-dynamic-partials
Advanced tools
Add it as middleware:
var app = express();
var partials = require('express-dynamic-partials');
app.locals.basedir = __dirname + '/partials');
app.use('/render', partials(app.locals.basedir, 'jade'));
Supports any view engine:
app.use('/render', partials(app.locals.basedir, 'ejs'));
If no view engine is specified, it will use the app's view engine:
app.set('view engine', 'ejs');
app.use('/render', partials(app.locals.basedir)); // will use ejs
Create a partial:
/partials
/my-partial.jade
h1= text
Dynamically render the partial:
curl localhost:3000/render/my-partial?text=hello
Returns:
<h1>hello</h1>
$ npm install express-dynamic-partials
var app = express();
var partials = require('express-dynamic-partials');
app.locals.basedir = __dirname + '/partials');
app.use('/render', partials(app.locals.basedir, 'jade'));
FAQs
render partials server side
We found that express-dynamic-partials 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.