Skip to content

Commit

Permalink
fix: Continuous integration improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Axeloooo committed Nov 19, 2023
1 parent 5b2b3b0 commit 86c1557
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "NODE_ENV=PROD node dist/src/index.js",
"predev": "npx prisma migrate dev --name init && npx prisma generate",
"dev": "NODE_ENV=DEV nodemon -e ts --exec \"npm run build && node dist/src/index.js\"",
"pretest": "npx prisma migrate deploy && npx prisma generate",
"pretest": "npx prisma migrate dev --name init && npx prisma generate",
"test": "NODE_ENV=TEST npm run build && mocha \"dist/test/**/*.test.js\""
},
"keywords": [],
Expand Down
3 changes: 0 additions & 3 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ import algorithmRouter from "./routers/algorithm.router.js";
import authenticationRouter from "./routers/authentication.router.js";
import errorHandler from "./middlewares/error.middleware.js";
import { PORT } from "./config/config.js";
import { PrismaClient } from "@prisma/client";

export const app: Express = express();

export const prisma = new PrismaClient();

app.use(cors());

app.use(express.json());
Expand Down
4 changes: 3 additions & 1 deletion backend/src/routers/authentication.router.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Router } from "express";
import { prisma } from "../index.js";
import { PrismaClient } from "@prisma/client";
import UserRepository from "../repositories/user.repository.js";
import AuthenticationService from "../services/authentication.service.js";
import AuthenticationController from "../controllers/authentication.controller.js";
Expand All @@ -11,6 +11,8 @@ import {

const authenticationRouter = Router();

const prisma = new PrismaClient();

const userRepository: UserRepositoryInterface = new UserRepository(prisma);

const authenticationService: AuthenticationServiceInterface =
Expand Down

0 comments on commit 86c1557

Please sign in to comment.