JSPM

@zapscloud/zapssession

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q47951F
  • License MIT

Zapscloud Session Package

Package Exports

  • @zapscloud/zapssession

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zapscloud/zapssession) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

zapssession

Zapscloud Session API Client

NodeJS express-session storage for ZapsDB.

Initialize Library with config values

const config = require('./config.json')
const session = require('express-session')
const ZapsSession = require('@zapscloud/zapssession')(session)

var _zapsconfig = {
    app: config.zapsapp,
    authkey: config.zapskey,
    authsecret: config.zapssecret
}

app.use(session({
    key: 'user_sid',
    secret: 'sessionsecret',
    resave: true,
    saveUninitialized: false,
    store: new ZapsSession({
        zapsdb: new ZapsDB(_zapsconfig),
        collection: 'appsession'
    }),
    cookie: {
        maxAge: 86400000
    }
}));