express-mids
v1.0.2
Published
Common express middlewares
Downloads
5
Readme
Express-mids
A collection of express middlewares
const express = require('express');
const {https, cors, session} = require('express-mids');
express().disable('x-powered-by') // meh
.use(https())
.use(cors({
ORIGINS: /\/helloworld.herokuapp.com$|\/localhost:\d+$/
}))
.use(session({
secret: 'some secret',
key: '_k'
}))
.listen(process.env.PORT || 3000);