@kenote/express-session
v1.0.32
Published
Session plug-in based on Express for Kenote.js.
Downloads
4
Readme
@kenote/express-session
Session plug-in based on Express for Kenote.js.
Usage
index.ts
import { Module, ServerFactory } from '@kenote/core'
import { ServiceEngine } from '@kenote/express'
import session from '@kenote/express-session'
import { MemoryStore } from 'express-session'
@Module({
imports: [],
plugins: [
session({
secret: 'secret name',
store: new MemoryStore(),
resave: true,
saveUninitialized: true
})
],
})
class AppModule {}
async bootstarp () {
let factory = await ServerFactory(new ServiceEngine()).create(AppModule)
factory.server.listen(4000)
}
MIT License.