mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-06 15:18:48 +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",
|
||||
"yarn prisma generate",
|
||||
"echo migrating database",
|
||||
"yarn prisma migrate dev"
|
||||
"yarn prisma migrate dev --name \"$(date +%Y%m%d%H%M%S)\""
|
||||
],
|
||||
"requiredKeys": [
|
||||
{ "name": "DATABASE_URL", "generated": true },
|
||||
|
|
|
@ -33,11 +33,13 @@ if (fs.existsSync(".env")) {
|
|||
missingConfigs.push(setting);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
missingConfigs = config.requiredKeys;
|
||||
}
|
||||
|
||||
if (missingConfigs.length < 1) {
|
||||
// if it`s all set abort the installation
|
||||
console.log("All required settings are already set in .env.");
|
||||
|
||||
if (missingConfigs.length < 1 ) {
|
||||
// if it`s all set abort the installation
|
||||
console.log("All required settings are already set in .env.");
|
||||
} else {
|
||||
// getting user input for the PostgreSQL username and password
|
||||
console.log("generrating .env file");
|
||||
|
|
|
@ -2,7 +2,7 @@ import express, { Request, Response } from "express";
|
|||
import dotenv from "dotenv";
|
||||
import { StatusCodes } from "http-status-codes";
|
||||
import { JwtPayload } from "jsonwebtoken";
|
||||
import { PrismaClient, Post } from "@prisma/client";
|
||||
import { PrismaClient, Post } from "../../prisma/app/generated/prisma/client";
|
||||
import { minioClient } from "../server";
|
||||
import { object } from "zod";
|
||||
import { uploadPostSchema } from "../schemas/postSchemas";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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 jwt from "jsonwebtoken";
|
||||
import dotenv from "dotenv";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue