Socket
Socket
Sign inDemoInstall

cloud-datastore-session

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloud-datastore-session

Google Cloud Datastore session store for Express/Connect


Version published
Maintainers
1
Created
Source

Google Cloud Datastore Sessions

cloud-datastore-session is a Express session storage backed by Google Cloud Datastore.

Note: Cloud Datastore is a persistent, distributed, transactional database. Often, it's more appropriate to choose a different storage solution for sessions such as Memcache or Redis as their designs offer much faster operation in this use case.

Installation

$ npm install --save cloud-datastore-session

Configuration

You must have a Google Cloud project and credentials. See gcloud node's documentation on setting up authorization.

Usage Example

var express = require('express');
var session = require('express-session');
var app = express();

var DatastoreStore = require('cloud-datastore-session')(session);

app.use(session({
  store: new DatastoreStore({
    dataset: gcloud.datastore.dataset({
        prefix: 'express-sessions',
        projectId: 'my-project-id',
        keyFilename: './key.json'
    }))
  }),
  secret: 'my-secret'
}));

Contributing changes

  • See CONTRIB.md

Licensing

FAQs

Package last updated on 18 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc