diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-05-22 09:33:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-22 09:33:29 -0400 |
| commit | 176b6e1b0c2133a28e65953e1f710bc265b9c971 (patch) | |
| tree | 34e7560276d0b32aa09b406b6566415f67125c1d /backend/src/db.js | |
| parent | 51f593384f1325b78a263d0d870d162236ed28d2 (diff) | |
| parent | 6e617cbcb456bd0316392d53550e9b34de16001a (diff) | |
Merge pull request #6 from wesbos/prisma
WIP: Updated Prisma related setup/code
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 |
