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() {
|
||||
}
|
||||
```
|
||||
## 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
|
||||
|
|
Loading…
Reference in New Issue