This commit is contained in:
Ryan Burnette 2019-04-10 14:17:15 +00:00
parent e41de293d4
commit f5fe01edaf
1 changed files with 28 additions and 8 deletions

View File

@ -40,14 +40,21 @@ include the `subject`.
function approveDomains() {
}
```
## Configuration
## Out of the box... it just works
### Defaults
No configuration is required. By default, you'll get a baked-in Sequelize
database running sqlite3.
```javascript
// TODO
greenlock.create({
store: require('le-store-sequelize'),
...
});
```
## Sequelize Options
### Database Connection
Without `config.dbOptions`, the baked-in sequelize object uses sqlite3 with
default options. If `config.dbOptions` is provided, you can configure the
@ -65,7 +72,7 @@ var store = require('le-store-sequelize')({
});
greenlock.create({
store
store,
...
});
```
@ -80,10 +87,23 @@ var store = require('le-store-sequelize')({
});
```
## Provide Your Own Database Object
### Custom Database Object
You can provide your own database object if you wish. It might not even need to
be Sequelize as long as it supports the same methods and argument objects as
are used.
You can pass in your own database object if you wish. It doesn't actually even
have to be a Sequelize database object, as long as the object responds to the
implemented methods and returns the expected results.
```javascript
var db = new MyDatabase();
var store = require('le-store-sequelize')({
db
});
greenlock.create({
store,
...
});
```
[1]: https://www.npmjs.com/package/le-store-sequelize