mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-07 04:18:46 +00:00
fixed bug when there is no .env file and corrected prisma path
This commit is contained in:
parent
a68d43a7f3
commit
78cf086a47
4 changed files with 9 additions and 7 deletions
|
@ -6,7 +6,7 @@
|
||||||
"echo generating prisma",
|
"echo generating prisma",
|
||||||
"yarn prisma generate",
|
"yarn prisma generate",
|
||||||
"echo migrating database",
|
"echo migrating database",
|
||||||
"yarn prisma migrate dev"
|
"yarn prisma migrate dev --name \"$(date +%Y%m%d%H%M%S)\""
|
||||||
],
|
],
|
||||||
"requiredKeys": [
|
"requiredKeys": [
|
||||||
{ "name": "DATABASE_URL", "generated": true },
|
{ "name": "DATABASE_URL", "generated": true },
|
||||||
|
|
|
@ -33,6 +33,8 @@ if (fs.existsSync(".env")) {
|
||||||
missingConfigs.push(setting);
|
missingConfigs.push(setting);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
missingConfigs = config.requiredKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (missingConfigs.length < 1 ) {
|
if (missingConfigs.length < 1 ) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import express, { Request, Response } from "express";
|
||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
import { StatusCodes } from "http-status-codes";
|
import { StatusCodes } from "http-status-codes";
|
||||||
import { JwtPayload } from "jsonwebtoken";
|
import { JwtPayload } from "jsonwebtoken";
|
||||||
import { PrismaClient, Post } from "@prisma/client";
|
import { PrismaClient, Post } from "../../prisma/app/generated/prisma/client";
|
||||||
import { minioClient } from "../server";
|
import { minioClient } from "../server";
|
||||||
import { object } from "zod";
|
import { object } from "zod";
|
||||||
import { uploadPostSchema } from "../schemas/postSchemas";
|
import { uploadPostSchema } from "../schemas/postSchemas";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import express, { Request, Response } from "express";
|
import express, { Request, Response } from "express";
|
||||||
import { PrismaClient, User } from "@prisma/client";
|
import { PrismaClient, User } from "../../prisma/app/generated/prisma/client";
|
||||||
import { UserLoginDto, UserRegistrationDto } from "../schemas/userSchemas";
|
import { UserLoginDto, UserRegistrationDto } from "../schemas/userSchemas";
|
||||||
import jwt from "jsonwebtoken";
|
import jwt from "jsonwebtoken";
|
||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue