Added mongodb document store adapter

This commit is contained in:
Evan Steinkerchner
2016-06-10 16:43:43 -04:00
parent 0209375865
commit d3db5e2a5d
2 changed files with 110 additions and 0 deletions

View File

@@ -149,6 +149,28 @@ or post.
All of which are optional except `type` with very logical default values.
### MongoDB
To use mongodb storage you must install the 'mongodb' pachage in npm
`npm install mongodb`
Once you've done that, your config section should look like:
``` json
{
"type": "mongodb",
"connectionUrl": "mongodb://localhost:27017/database"
}
```
You can also just set the environment variable for `DATABASE_URL` to your database connection url.
Unlike with postgres you do NOT have to create the table in your mongo database prior to running.
You can also set an `expire` option to the number of seconds to expire keys in.
This is off by default, but will constantly kick back expirations on each view or post.
### Memcached
To use memcached storage you must install the `memcache` package via npm