Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
express-exorcism
Advanced tools
express-exorcism is an Express.js
Router
wrapper that helps to handle async routes.
NB: Minimal Node
version is 7.5.0
with --harmony
or 7.6.0
.
npm install express-exorcism --save
or
yarn add express-exorcism
Run espress-exorcism
once before first router usage to wrap entire express
.
e.g. right after fist express
require:
var express = require('express');
require('express-exorcism')(express);
var router = express.Router();
...
or es6
import express from 'express'
import exorcism from 'express-exorcism'
exorcism(express)
const router = express.Router();
...
NB: If you're using import
instead of require
and express-exorcism
is not
working for you, it means that express.Router
instances are created before
express-exorcism
wrapper is run. For example if you have import './routes'
even after wrapping express
- node will run it before.
By default you can wrap express
only once with one configuration.
If you need different configurations for different routers or other strange stuff -
consider to use singletonRouter
option to create router instance wrappers:
var express = require('express');
var router = require('express-exorcism')(express, {singletonRouter: true});
...
or es6
import express from 'express'
import exorcism from 'express-exorcism'
const router = exorcism(express, {singletonRouter: true})
...
NB: router
will represent wrapped express.Router()
instance, instead of
modifying original express.Router
methods.
Please file an issue on github!
FAQs
Express.js router wrapper for async routes
We found that express-exorcism 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.