express-oracle-session-ts
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Install

npm install express-oracle-session-ts

Usage

import express from "express";
import eos from "express-oracle-session-ts";
import session from "express-session";

const OracleSessionStore = eos(session);

const sessionStore = new OracleSessionStore({
  user: ORACLE.user,
  password: ORACLE.password,
  connectionString: ORACLE.conStr,
  schema: {
    tableName: "tbl_cloud_session",
  },
});

// Create Express server
const app = express();

app.use(
  session({
    resave: true,
    saveUninitialized: true,
    secret: SESSION_SECRET,
    store: sessionStore,
  })
);

Notes

  • this module was largely a port of express-oracle-session to typescript because at that time express-oracle-session failed to work with node oracle 5. But it seems that it has been updated recently probably to address this issue.
  • works with lastest node oracle (5+).
  • will create new table if the current session table doesn't not exist.
  • querying oracle DB, if failed, this module will retry three times. If it can't get the connection it will throw an error and exit the app (process.exit(1)).

Readme

Keywords

none

Package Sidebar

Install

npm i express-oracle-session-ts

Weekly Downloads

213

Version

0.0.4

License

MIT

Unpacked Size

15.4 kB

Total Files

5

Last publish

Collaborators

  • thanhvg