forked from googleapis/nodejs-datastore-session
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,342 additions
and
54 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This is the official list of cloud-functions-emulator project authors. | ||
# | ||
# Names are formatted as: | ||
# Name or Organization [email address] | ||
# | ||
# The email address is not required for organizations. | ||
# | ||
Google Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
##### 1.0.0-alpha.1 - 09 January 2017 | ||
##### 1.0.0 - 09 January 2017 | ||
|
||
###### Breaking changes | ||
|
||
- Changed dependency on `gcloud` to ` peer dependency on `@google-cloud/datastore` | ||
- Rename package to `@google-cloud/connect-datastore` | ||
|
||
###### Other | ||
|
||
- Update code style and switch to using Semistandard for linting | ||
- Added `yarn.lock` file | ||
- Updated licensing, authors, contributors, readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This is the official list of cloud-functions-emulator project contributors. | ||
# | ||
# Names are formatted as: | ||
# Name [email address] | ||
# | ||
Jason Dobry <[email protected]> | ||
Jon Wayne Parrott <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/> | ||
|
||
# Google Cloud Datastore Sessions | ||
|
||
**@google-cloud/connect-datastore** is a [Google Cloud Datastore][datastore] | ||
session store backed by [@google-cloud/datastore][datastore_lib]. | ||
|
||
**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 @google-cloud/connect-datastore | ||
|
||
or | ||
|
||
yarn add @google-cloud/connect-datastore | ||
|
||
## Configuration | ||
|
||
You must have a Google Cloud project and credentials. | ||
|
||
See [gcloud node's documentation][auth] on setting up authentication. | ||
|
||
## Usage Example | ||
|
||
```javascript | ||
var Datastore = require('@google-cloud/datastore'); | ||
|
||
var express = require('express'); | ||
var session = require('express-session'); | ||
var app = express(); | ||
|
||
var DatastoreStore = require('@google-cloud/connect-datastore')(session); | ||
|
||
app.use(session({ | ||
store: new DatastoreStore({ | ||
dataset: Datastore({ | ||
prefix: 'express-sessions', | ||
|
||
// For convenience, @google-cloud/datastore automatically looks for the | ||
// GCLOUD_PROJECT environment variable. Or you can explicitly pass in a | ||
// project ID here: | ||
projectId: 'YOUR_PROJECT_ID' || process.env.GCLOUD_PROJECT, | ||
|
||
// For convenience, @google-cloud/datastore automatically looks for the | ||
// GOOGLE_APPLICATION_CREDENTIALS environment variable. Or you can | ||
// explicitly pass in that path to your key file here: | ||
keyFilename: '/path/to/keyfile.json' || process.env.GOOGLE_APPLICATION_CREDENTIALS | ||
}) | ||
}), | ||
secret: 'my-secret' | ||
})); | ||
``` | ||
|
||
## Contributing | ||
|
||
* See [CONTRIBUTING.md](.github/CONTRIBUTING.md) | ||
|
||
## License | ||
|
||
* Apache 2.0 - See [LICENSE](LICENSE) | ||
|
||
[express]: http://expressjs.com/ | ||
[datastore]: https://cloud.google.com/datastore/docs | ||
[datastore_lib]: https://www.npmjs.com/package/@google-cloud/datastore | ||
[auth]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/latest/guides/authentication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
{ | ||
"name": "cloud-datastore-session", | ||
"name": "@google-cloud/connect-datastore", | ||
"description": "Google Cloud Datastore session store for Express/Connect", | ||
"version": "0.1.0", | ||
"author": "Jon Wayne Parrott <[email protected]>", | ||
"main": "./index.js", | ||
"version": "1.0.0", | ||
"license": "Apache-2.0", | ||
"author": "Google Inc.", | ||
"main": "./src/index.js", | ||
"engines": { | ||
"node": ">= 0.12.x" | ||
}, | ||
"files": [ | ||
"AUTHORS", | ||
"CONTRIBUTORS", | ||
"src/" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/GoogleCloudPlatform/cloud-datastore-session-node" | ||
"url": "https://github.com/GoogleCloudPlatform/cloud-datastore-session-node.git" | ||
}, | ||
"peerDependencies": { | ||
"@google-cloud/datastore": "^0.6.0" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/GoogleCloudPlatform/cloud-datastore-session-node/issues" | ||
}, | ||
"scripts": { | ||
"lint": "semistandard \"**/*.js\"" | ||
}, | ||
"semistandard": { | ||
"globals": [ | ||
"after", | ||
|
@@ -32,11 +38,14 @@ | |
"doc" | ||
] | ||
}, | ||
"scripts": { | ||
"lint": "semistandard \"**/*.js\"" | ||
}, | ||
"devDependencies": { | ||
"@google-cloud/datastore": "^0.6.0", | ||
"@google-cloud/datastore": "0.6.0", | ||
"express": "4.14.0", | ||
"express-session": "1.14.2", | ||
"mocha": "3.2.0", | ||
"semistandard": "^9.2.1" | ||
"semistandard": "9.2.1" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.