Add REPL bootstrapper and associated npm command

This commit is contained in:
Romain Thouvenin 2024-02-14 12:25:17 +01:00
parent 193e613ad6
commit 0a92d93949
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-user-api npm run start -- --entryFile repl",
"migrate": "docker exec v3-user-api sh -c 'npx prisma migrate deploy'", "migrate": "docker exec v3-user-api sh -c 'npx prisma migrate deploy'",
"migrate:dev": "docker exec v3-user-api sh -c 'npx prisma migrate dev'", "migrate:dev": "docker exec v3-user-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();