Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkshnwesper/couchdb-expression
Express Session Store for CouchDB
https://github.com/tkshnwesper/couchdb-expression
couchdb express express-session
Last synced: 8 days 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-28T14:10:23.000Z (12 months ago)
- Last Synced: 2024-10-13T06:42:54.314Z (about 1 month ago)
- Topics: couchdb, express, express-session
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/couchdb-expression
- Size: 763 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# couchdb-expression [![GitHub license](https://img.shields.io/github/license/tkshnwesper/couchdb-expression.svg?style=for-the-badge)](https://github.com/tkshnwesper/couchdb-expression/blob/master/LICENSE)
[![NPM](https://nodei.co/npm/couchdb-expression.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/couchdb-expression/)
[![Coverage Status](https://coveralls.io/repos/github/tkshnwesper/couchdb-expression/badge.svg?branch=master)](https://coveralls.io/github/tkshnwesper/couchdb-expression?branch=master) [![npm version](https://badge.fury.io/js/couchdb-expression.svg)](https://badge.fury.io/js/couchdb-expression) [![Known Vulnerabilities](https://snyk.io/test/github/tkshnwesper/couchdb-expression/badge.svg)](https://snyk.io/test/github/tkshnwesper/couchdb-expression) [![Maintainability](https://api.codeclimate.com/v1/badges/963c0939efe683828797/maintainability)](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! ^-^