yolen
12/14/2018, 9:52 AMconst db = new Prisma({
endpoint: `http://${process.env.PRISMA_SERVICE_NAME}:${
process.env.PRISMA_PORT
}`,
secret: process.env.PRISMA_SECRET,
})
but in the generated javascript client this seems to be hardcoded: exports.Prisma = prisma_lib_1.makePrismaClientClass({
typeDefs,
models,
endpoint: `<http://localhost:${process.env[%22PRISMA_PORT%22]}|http://localhost:${process.env["PRISMA_PORT"]}>`,
secret: `${process.env["PRISMA_SECRET"]}`
});
exports.prisma = new exports.Prisma();
divyendu
12/14/2018, 10:00 AMprisma.yml
file?yolen
12/14/2018, 10:02 AMdatamodel:
- enums.prisma
- types.prisma
seed:
import: ./seed/seed.graphql
# this can be an environment variable OR the endpoint from the initial prisma init/deploy
endpoint: <http://localhost:${env:PRISMA_PORT}>
hooks:
post-deploy:
- prisma generate
# see: <https://www.prisma.io/docs/prisma-graphql-api/reference/authentication-ghd4/>
secret: ${env:PRISMA_SECRET}
generate:
- generator: typescript-client
output: build/prisma-client/typescript
- generator: javascript-client
output: build/prisma-client/javascript
# replaces - graphql get-schema --project prisma
# copy prisma schema to prisma client
- generator: graphql-schema
output: build/schema/
divyendu
12/14/2018, 10:06 AMPRISMA_PORT
is coming from the endpoint property in prisma.yml
file.. it is an environment variabledivyendu
12/14/2018, 10:06 AMprisma generate
againyolen
12/14/2018, 10:08 AMyolen
12/14/2018, 10:08 AMdivyendu
12/14/2018, 10:34 AMdivyendu
12/14/2018, 10:34 AMyolen
12/14/2018, 10:35 AMconst db = new Prisma({
endpoint: `http://${process.env.PRISMA_SERVICE_NAME}:${
process.env.PRISMA_PORT
}`,
secret: process.env.PRISMA_SECRET,
})
do you know where I can find an example? could not see it done this way in prisma-examples