【文件属性】:
文件名称:restify-state:用于restify的会话和cookies
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-13 22:25:38
JavaScript
恢复状态
模块提供了中间件,用于在 Restify 请求之间保存状态。
安装
npm install restify-state
用法
const restify = require ( 'restify' ) ;
const restifyState = require ( 'restify-state' ) ;
let server = restify . createServer ( {
name : 'app'
} ) ;
server . use ( restifyState . cookieParser ( ) ) ;
server . use ( restifyState . session ( { // default
name : 'user_session' ,
proxy : false ,
store : null ,
path : '/'
【文件预览】:
restify-state-master
----package.json(517B)
----src()
--------index.js(264B)
--------session.js(2KB)
--------request-session.js(305B)
--------cookie-parser.js(503B)
--------store()
----.npmignore(23B)
----.gitignore(29B)
----README.md(768B)