
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.
express-rev
Advanced tools
Middleware which adds helper functions for dealing with manifest files and file fingerprints.
Middleware which adds helper functions for dealing with manifest files and file fingerprints.
Configure your ExpressJS project based on the example below. Include this middleware before rendering a view.
// index.js (example ExpressJS application)
var express = require('express');
var manifest = require('express-rev');
var app = express();
app.set('views', './views');
app.set('view engine', 'jade');
app.use(rev({
manifest: './public/assets/manifest.json',
prepend: '/assets'
}));
app.use('/', express.static('./public'));
app.get('/', function (req, res) {
res.render('index');
});
module.exports = app;
Now you can use rev function in your views to print file path.
// index.jade (example jade view)
doctype html
html(lang='en')
head
title Asset Fingerprint Example
link(rel='stylesheet', type='text/css', href=assetPath('index.css'))
script(type='text/javascript', src='assetPath(index.js'))
body
img(src=assetPath('logo.png'))
Now all you need is a good asset-pipeline module. Use gulp with gulp-devkit for that.
Open defaults.json file to see the default configuration values.
Path to JSON manifest file (e.g this file will generate the gulp-rev-all plugin). Manifest replace-process is ignored if the file does not exist.
URL path where static route for assets should be mounted.
FAQs
Middleware which adds helper functions for dealing with manifest files and file fingerprints.
We found that express-rev 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
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.