summaryrefslogtreecommitdiffstats
path: root/db/mongoose.js
diff options
context:
space:
mode:
authorGravatar piotrruss <mail@pruss.it> 2023-08-10 18:42:20 +0200
committerGravatar piotrruss <mail@pruss.it> 2023-08-10 22:47:33 +0200
commitbdb0762696ccf028c30b2957b93a01da7bf67571 (patch)
treeffb3e9483eb5e0fcfa1aed4a6cbecc3b28a9e09a /db/mongoose.js
downloadauth-service-bdb0762696ccf028c30b2957b93a01da7bf67571.tar.gz
auth-service-bdb0762696ccf028c30b2957b93a01da7bf67571.tar.bz2
auth-service-bdb0762696ccf028c30b2957b93a01da7bf67571.zip
init commit
Diffstat (limited to 'db/mongoose.js')
-rw-r--r--db/mongoose.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/mongoose.js b/db/mongoose.js
new file mode 100644
index 0000000..3b357d3
--- /dev/null
+++ b/db/mongoose.js
@@ -0,0 +1,9 @@
+const mongoose = require('mongoose')
+
+mongoose.set('strictQuery', true)
+
+mongoose.connect(
+ process.env.DB_CONNECT,
+ { dbName: 'auth' },
+ () => { console.log('Successfully connected to db.') },
+)