
Security News
n8n Tops 2025 JavaScript Rising Stars as Workflow Platforms Gain Momentum
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.
browser-server
Advanced tools
A HTTP "server" in the browser that uses a service worker to allow you to easily send back your own stream of data.
A HTTP "server" in the browser that uses a service worker to allow you to easily send back your own stream of data.
npm install browser-server
First generate the service worker, using the browser-server command line tool
npm install -g browser-server
# /demo is the prefix you want to intercept
browser-server /demo > worker.js
Then create a simple app and browserify it
var createServer = require('browser-server')
var server = createServer()
server.on('request', function (req, res) {
console.log('intercepting request', req)
res.end('hello world')
})
server.on('ready', function () {
fetch('/demo/test.txt').then(function (r) {
return r.text()
}).then(function (txt) {
console.log('fetch returned', txt)
})
})
Then browserify this app
browserify app.js > bundle.js
And make a index.html page like this
<!DOCTYPE html>
<html>
<body>
<script src="bundle.js"></script>
</body>
</html>
Make sure the worker.js file is also stored in the same folder.
Now serve the folder using a http server, fx
npm install -g http-server
http-server .
Now if you open index.html you should see the server intercepting the request and returning hello world.
Works for all http apis, including video/audio tags!
MIT
FAQs
A HTTP "server" in the browser that uses a service worker to allow you to easily send back your own stream of data.
The npm package browser-server receives a total of 1 weekly downloads. As such, browser-server popularity was classified as not popular.
We found that browser-server 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
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.

Security News
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.

Security News
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.