
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Express/Connect middleware that serves local or remote static files.
npm install broker --save
Serve static files
var express = require('express');
var broker = require('broker');
var app = express();
app.use(broker({
root: '/public'
}));
app.listen(3000, function () {
});
Proxy remote files
var express = require('express');
var broker = require('broker');
var app = express();
app.use(broker({
root: 'http://proxyserver.com'
}));
app.listen(3000, function () {
});
root
- the root directory if serving local files or the url to prepend to requests to proxy remote static filesindex
- a string or array of strings that define the directory index filedotfiles
- how to handle files that begin with a dot. These are usually hidden files. The default value is ignore. Available options:
allow
- No special treatment for dotfilesdeny
- Send a 403 for any request for a dotfileignore
- Pretend like the dotfile does not exist and 404npm install
npm test
FAQs
Express/Connect middleware that serves local or remote static files
The npm package broker receives a total of 9 weekly downloads. As such, broker popularity was classified as not popular.
We found that broker 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.