https://github.com/tkshnwesper/couchdb-expression
Express Session Store for CouchDB
https://github.com/tkshnwesper/couchdb-expression
couchdb express express-session
Last synced: about 1 month ago
JSON representation
Express Session Store for CouchDB
- Host: GitHub
- URL: https://github.com/tkshnwesper/couchdb-expression
- Owner: tkshnwesper
- License: mit
- Created: 2017-10-10T21:13:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-09T15:46:33.000Z (7 months ago)
- Last Synced: 2025-04-14T01:05:38.586Z (about 2 months ago)
- Topics: couchdb, express, express-session
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/couchdb-expression
- Size: 909 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# couchdb-expression [](https://github.com/tkshnwesper/couchdb-expression/blob/master/LICENSE)
[](https://nodei.co/npm/couchdb-expression/)
[](https://coveralls.io/github/tkshnwesper/couchdb-expression?branch=master) [](https://badge.fury.io/js/couchdb-expression) [](https://snyk.io/test/github/tkshnwesper/couchdb-expression) [](https://codeclimate.com/github/tkshnwesper/couchdb-expression/maintainability)
## Installing
```sh
npm i couchdb-expression
```## Usage
A sample program:
```js
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](https://github.com/tkshnwesper/couchdb-expression/issues).Happy Coding! ^-^