diff options
| author | Jan Tuomi <jan.tuomi@eficode.com> | 2018-07-12 12:22:15 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@eficode.com> | 2018-07-12 12:23:14 +0300 |
| commit | 33fc72e5ce47a0669072d173e6f95e6e3661f516 (patch) | |
| tree | a24c7ecf95a7ba54e6fa4d48e4727e74b358ea60 /models.js | |
| parent | 2d9e63a11b1a0e6052d794d87b614df854ca4536 (diff) | |
Initial commit
Diffstat (limited to 'models.js')
| -rw-r--r-- | models.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models.js b/models.js new file mode 100644 index 0000000..343d1f6 --- /dev/null +++ b/models.js @@ -0,0 +1,8 @@ +module.exports = db => { + const endpoints = db.get('endpoints'); + endpoints.createIndex({ name: 1 }, { unique: true }); + + return { + endpoints, + }; +} |
