{"id":21838255,"url":"https://github.com/webcc/cassandra-store","last_synced_at":"2025-07-03T17:11:04.092Z","repository":{"id":21352253,"uuid":"24669353","full_name":"webcc/cassandra-store","owner":"webcc","description":"Implementation of the session storage in Apache Cassandra as express middleware.","archived":false,"fork":false,"pushed_at":"2018-10-24T18:18:36.000Z","size":59,"stargazers_count":14,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-09T12:48:47.260Z","etag":null,"topics":["cassandra","cassandra-client","express-middleware","javascript","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-01T07:22:38.000Z","updated_at":"2018-10-25T16:06:14.000Z","dependencies_parsed_at":"2022-08-28T13:41:22.216Z","dependency_job_id":null,"html_url":"https://github.com/webcc/cassandra-store","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/webcc/cassandra-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcc%2Fcassandra-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcc%2Fcassandra-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcc%2Fcassandra-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcc%2Fcassandra-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webcc","download_url":"https://codeload.github.com/webcc/cassandra-store/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcc%2Fcassandra-store/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260937707,"owners_count":23085729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cassandra","cassandra-client","express-middleware","javascript","nodejs"],"created_at":"2024-11-27T21:09:32.073Z","updated_at":"2025-07-03T17:11:04.073Z","avatar_url":"https://github.com/webcc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"cassandra-store\n===============\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][npm-downloads]][npm-url]\n![Node][node-version]\n\nImplementation of the session storage in [Apache Cassandra][cassandra]\nas an extension of the [express-session middleware][express-session].\nThis version has been fully updated to ES6 and Node.js \u003e= 10. For backwards\ncompatibility, use older versions of the package.\n\n## Installation\n\n```shell\n$ npm install [-g] cassandra-store\n```\n\n## Options\n\n```json\n{\n    \"table\": \"sessions\",\n    \"client\": null,\n    \"clientOptions\": {\n        \"contactPoints\": [ \"localhost\" ],\n        \"keyspace\": \"tests\",\n        \"queryOptions\": {\n            \"prepare\": true\n        }\n    }\n}\n```\n\nIf `client` is `null` or undefined, a new Cassandra client will be created.\nClient options come from the [Cassandra client driver][cassandra-driver] (version 3.x).\n\n## Configuring the database\n\nTo create the table in the Cassandra database, you need the execute the\nfollowing CQL commands:\n\n```\nUSE tests;\n\nDROP TABLE IF EXISTS sessions;\n\nCREATE TABLE IF NOT EXISTS sessions (\n   sid text,\n   session text,\n   expires timestamp,\n   PRIMARY KEY(sid)\n);\n```\n\n## Debugging\n\nTo activate debugging, set the environment variable `NODE_DEBUG`:\n\n```shell\n$ export NODE_DEBUG=cassandra-store\n```\n\n## Testing\n\nSee [test/README.md](test/README.md)\n\n## Usage\n\nUsage within express:\n\n```javascript\nconst session = require(\"express-session\");\nconst CassandraStore = require(\"cassandra-store\");\n\napp.use(session({\n    store: new CassandraStore(options),\n    ...\n}));\n```\n\n## TODO\n\n- Update to Cassandra driver Promises API\n\n[cassandra]: https://cassandra.apache.org/\n[cassandra-driver]: https://docs.datastax.com/en/developer/nodejs-driver/3.5/\n[express-session]: https://github.com/expressjs/session\n[node-version]: https://img.shields.io/badge/node-10-orange.svg?style=flat-square\n[npm-image]: https://img.shields.io/badge/npm-5.1.0-blue.svg?style=flat-square\n[npm-downloads]: https://img.shields.io/badge/downloads-12k-red.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/cassandra-store","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcc%2Fcassandra-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebcc%2Fcassandra-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcc%2Fcassandra-store/lists"}