From c5445348614486c95fc5f989ca2b19f00946824f Mon Sep 17 00:00:00 2001 From: Johannes Schickling Date: Mon, 21 May 2018 17:44:31 -0700 Subject: refactor db file --- backend/src/db.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 backend/src/db.js (limited to 'backend/src/db.js') 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 -- cgit v1.3