express-whs
v1.0.0
Published
Express-WHS is helper function for WHStorage, Presented as expressjs middleware
Downloads
3
Readme
Express-WHS 1.0.0
Installation
Expressjs Middleware (Server-Side)
npm install --save express-whs
Client Side Module
bower install whstorage
npm install whstorage
yarn add whstorage
Usage
const express = require('express')
const whs = require('express-whs')
/*
* Define Exprees App
*/
const app = express();
app.use(whs({
prefix: 'wh',
secret: 'thisismysecret',
keySize: 36
}))
/*
* send to client
*/
app.get('/api', (req, res, next) => {
res.send({
whKey: req.wh_Key,
prefix: req.wh_prefix
})
})