
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
express-emitter
Advanced tools
Start a new HTTP server in one-line. Based on express. Emittable and controllable.
Create a new HTTP server that is ready to accept incoming connections in one line:
import Server from 'express-emitter';
// Launches a new HTTP server
new Server();
Server
extends node's EventEmitter
so you can listen to it:
new Server()
.on('listening', () => console.log('Server is listening'))
.on('error', error => console.log(error.stack))
.on('closed', () => console.log('Server is listening'));
const server = new Server();
// Stop server
server.stop();
// Start server
server.start();
// Restart server
server.restart();
// You can chain control actions with listeners
server
.restart()
.on('closed', () => console.log('closed'))
.on('listening', () => console.log('listening'));
You can customize the express app:
new Server(app => {
app.set('port', 4000);
app.get('/', (req, res, next) => res.send('Welcome to my server!'));
app.use('/', (req, res, next) => next(new Error('Only GET accepted !')));
});
Checkout express documentation for more.
FAQs
express-emitter ===
The npm package express-emitter receives a total of 8 weekly downloads. As such, express-emitter popularity was classified as not popular.
We found that express-emitter 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.