fix(script): added script envprisma in root package.json

dotenv loads all environment variable before running prisma:migrate-dev script
This commit is contained in:
Aditya @ArchLinux
2023-10-04 20:04:07 +05:30
parent f637381198
commit 68458b50d2
3 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
/// <reference types="@documenso/tsconfig/process-env.d.ts" />
require('dotenv').config();
export const getDatabaseUrl = () => {
if (process.env.NEXT_PRIVATE_DATABASE_URL) {

View File

@ -18,6 +18,8 @@
},
"dependencies": {
"@prisma/client": "5.3.1",
"dotenv": "^16.3.1",
"dotenv-cli": "^7.3.0",
"prisma": "5.3.1"
},
"devDependencies": {