diff options
| author | Johannes Schickling <schickling.j@gmail.com> | 2018-05-21 17:44:31 -0700 |
|---|---|---|
| committer | Johannes Schickling <schickling.j@gmail.com> | 2018-05-21 17:44:31 -0700 |
| commit | c5445348614486c95fc5f989ca2b19f00946824f (patch) | |
| tree | 08ae3a32879c485450cdb74784715a9cf508cfb7 /backend/src/db.js | |
| parent | 603f1a0e9df2f88184cc03ce2e7177547daa0674 (diff) | |
refactor db file
Diffstat (limited to 'backend/src/db.js')
| -rw-r--r-- | backend/src/db.js | 10 |
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 |
