@corex/typeorm-pg-session
v1.8.2
Published
## Installation
Downloads
109
Readme
name: typeorm-pg-session route: /corex/typeorm-pg-session
@corex/typeorm-pg-session
Installation
yarn add @corex/typeorm-pg-session
Usage
Add SessionEntity
to typeorm
connection options
import { SessionEntity } from '@corex/typeorm-pg-session'
const connectionOptions = {
/** other connection options **/
entities : [
SessionEntity,
...<your entities>
]
}
Add SessionStore
to express-session
import { SessionStore } from '@corex/typeorm-pg-session'
import session from 'express-session'
app.use(
session({
...<session options>,
store: new SessionStore()
})
)