schema env file
Is there a way to dinamically chose the env file that schema.prisma will use? For example:
1 Reply
if you are using nodejs, you can add below code to app.js
if(process.env.NODE_ENV){
require('dotenv').config({path: '.' + process.env.NODE_ENV + '.env' + })
}else{
require('dotenv').config()
}
then using below script to defined which NODE_ENV you want to use
cross-env NODE_ENV=stage nodemon src/app.js