Is there a recommended approach to sharing environ...
# orm-help
h
Is there a recommended approach to sharing environment variables between
prisma.yml
(i.e. with
.env.prod
,
.env.dev
, etc) and the
index.js
file?
p
I haven't tested this with Prisma yet, but adding a
custom
section in your
prisma.yml
should work. For example:
Copy code
custom:
    staging:
        WEBHOOK_URL: "<https://staging.catz.app/hook>"
    prod:
        WEBHOOK_URL: "<https://catz.app/hook>"

functions:
    catCreate:
        type: operationBefore
        operation: Cat.create
        handler:
            webhook: ${self.custom.${opt:target}.WEBHOOK_URL}