couchdb-expression

1.6.1 • Public • Published

couchdb-expression GitHub license

NPM

Coverage Status npm version Known Vulnerabilities Maintainability

Installing

npm i couchdb-expression

Usage

A sample program:

const express = require('express');
const session = require('express-session');
const Expression = require('couchdb-expression')(session);

const store = new Expression({
  username: 'root',         // default value = 'admin'
  password: 'hello123',     // default value = 'password'
  hostname: 'localhost',    // default value = 'localhost'
  port: '5984',             // default value = 5984
  database: 'sessions',     // default value = 'sessions'
  https: false              // default value = false
});

const app = express();

app.use(session({
  store: store,
  secret: 'meow',
  cookie: {
    maxAge: 3000,
  },
  resave: true,
  saveUninitialized: true,
}));

app.get('/', (req, res) => {
  console.log(req.session);
  res.send('hello world');
});

app.listen(3000);

Issues

Let me know if you face any issues, I would be happy to help! :) Post your issues here.

Happy Coding! ^-^

Dependents (1)

Package Sidebar

Install

npm i couchdb-expression

Weekly Downloads

12

Version

1.6.1

License

MIT

Unpacked Size

14 kB

Total Files

5

Last publish

Collaborators

  • tkshnwesper