example swap

This commit is contained in:
AJ ONeal 2019-05-09 01:07:16 -06:00
parent 25013e7864
commit 5cf90c1109
1 changed files with 5 additions and 5 deletions

View File

@ -67,11 +67,10 @@ Greenlock.create({
You may use database URLs (also known as 'connection strings') to initialize sequelize:
```js
var Sequelize = require('sequelize');
var db = new Sequelize('postgres://user:pass@hostname:port/database');
var dbUrl = 'postgres://user:pass@hostname:port/database';
Greenlock.create({
store: require('greenlock-store-sequelize').create({ db: db })
store: require('greenlock-store-sequelize').create({ storeDatabaseUrl: dbUrl })
...
});
```
@ -79,10 +78,11 @@ Greenlock.create({
If you need to use **custom options**, just instantiate sequelize directly:
```js
var dbUrl = 'postgres://user:pass@hostname:port/database';
var Sequelize = require('sequelize');
var db = new Sequelize('postgres://user:pass@hostname:port/database');
Greenlock.create({
store: require('greenlock-store-sequelize').create({ storeDatabaseUrl: dbUrl })
store: require('greenlock-store-sequelize').create({ db: db })
...
});
```