aboutsummaryrefslogtreecommitdiffstats
path: root/models.js
diff options
context:
space:
mode:
Diffstat (limited to 'models.js')
-rw-r--r--models.js8
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,
+ };
+}