Skip to content
Snippets Groups Projects
Commit 08e24877 authored by PASQUIER-TROIANO AZZO's avatar PASQUIER-TROIANO AZZO
Browse files

architecture ajoutée et début du setup avec la db

parent 770491eb
2 merge requests!38feat: V1,!1🔀 merge init Feature/init project
......@@ -9,7 +9,7 @@
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
......
......@@ -9,7 +9,7 @@ generator client {
}
datasource db {
provider = "sqlite"
provider = "mysql"
url = env("DATABASE_URL")
}
......
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AppController } from './application/controllers/app.controller';
import { AppService } from './application/services/app.service';
@Module({
imports: [],
......
import { Test, TestingModule } from '@nestjs/testing';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AppService } from '../services/app.service';
describe('AppController', () => {
let appController: AppController;
......
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import { AppService } from '../services/app.service';
@Controller()
export class AppController {
......
File moved
// src/infrastructure/prisma/prisma.service.ts
import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';
@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
async onModuleInit() {
await this.$connect();
}
async onModuleDestroy() {
await this.$disconnect();
}
}
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';
import { AppModule } from '../src/app.module';
describe('AppController (e2e)', () => {
let app: INestApplication;
......
{
"extends": "./tsconfig.json",
"path":{
// a config plus tard
},
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment