summaryrefslogtreecommitdiffstats
path: root/backend/src/db.js
diff options
context:
space:
mode:
authorJohannes Schickling <schickling.j@gmail.com>2018-05-21 17:44:31 -0700
committerJohannes Schickling <schickling.j@gmail.com>2018-05-21 17:44:31 -0700
commitc5445348614486c95fc5f989ca2b19f00946824f (patch)
tree08ae3a32879c485450cdb74784715a9cf508cfb7 /backend/src/db.js
parent603f1a0e9df2f88184cc03ce2e7177547daa0674 (diff)
refactor db file
Diffstat (limited to 'backend/src/db.js')
-rw-r--r--backend/src/db.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/backend/src/db.js b/backend/src/db.js
new file mode 100644
index 0000000..e8caa14
--- /dev/null
+++ b/backend/src/db.js
@@ -0,0 +1,10 @@
+const { Prisma } = require('prisma-binding');
+
+const db = new Prisma({
+ typeDefs: 'src/generated/prisma.graphql',
+ endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma DB service (value is set in variables.env)
+ secret: process.env.PRISMA_SECRET, // taken from prisma/prisma.yml (value is set in .env)
+ debug: false, // log all GraphQL queries & mutations
+});
+
+module.exports = db; \ No newline at end of file