Add REPL module and script

This commit is contained in:
Romain Thouvenin 2024-02-27 13:44:11 +01:00
parent a7cb98df56
commit 3cc5097294
2 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,7 @@
"test:integration:ci": "npm run migrate:test:ci && dotenv -e ci/.env.ci -- jest --testPathPattern 'tests/integration/' --runInBand", "test:integration:ci": "npm run migrate:test:ci && dotenv -e ci/.env.ci -- jest --testPathPattern 'tests/integration/' --runInBand",
"test:cov": "jest --testPathPattern 'tests/unit/' --coverage", "test:cov": "jest --testPathPattern 'tests/unit/' --coverage",
"test:e2e": "jest --config ./test/jest-e2e.json", "test:e2e": "jest --config ./test/jest-e2e.json",
"repl": "docker exec -it v3-auth-api npm run start -- --entryFile repl",
"migrate": "docker exec v3-auth-api sh -c 'npx prisma migrate deploy'", "migrate": "docker exec v3-auth-api sh -c 'npx prisma migrate deploy'",
"migrate:dev": "docker exec v3-auth-api sh -c 'npx prisma migrate dev'", "migrate:dev": "docker exec v3-auth-api sh -c 'npx prisma migrate dev'",
"migrate:test": "dotenv -e .env.test -- npx prisma migrate deploy", "migrate:test": "dotenv -e .env.test -- npx prisma migrate deploy",

7
src/repl.ts Normal file
View File

@ -0,0 +1,7 @@
import { repl } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
await repl(AppModule);
}
bootstrap();