readme
This commit is contained in:
parent
e41de293d4
commit
f5fe01edaf
36
README.md
36
README.md
|
@ -40,14 +40,21 @@ include the `subject`.
|
||||||
function approveDomains() {
|
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
|
```javascript
|
||||||
// TODO
|
greenlock.create({
|
||||||
|
store: require('le-store-sequelize'),
|
||||||
|
...
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Sequelize Options
|
### Database Connection
|
||||||
|
|
||||||
Without `config.dbOptions`, the baked-in sequelize object uses sqlite3 with
|
Without `config.dbOptions`, the baked-in sequelize object uses sqlite3 with
|
||||||
default options. If `config.dbOptions` is provided, you can configure the
|
default options. If `config.dbOptions` is provided, you can configure the
|
||||||
|
@ -65,7 +72,7 @@ var store = require('le-store-sequelize')({
|
||||||
});
|
});
|
||||||
|
|
||||||
greenlock.create({
|
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
|
You can pass in your own database object if you wish. It doesn't actually even
|
||||||
be Sequelize as long as it supports the same methods and argument objects as
|
have to be a Sequelize database object, as long as the object responds to the
|
||||||
are used.
|
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
|
[1]: https://www.npmjs.com/package/le-store-sequelize
|
||||||
|
|
Loading…
Reference in New Issue