Skip to content

Commit bcfd635

Browse files
committed
Merge remote-tracking branch 'origin/main' into 5-post-api
2 parents 74d7fe8 + 6e8b424 commit bcfd635

26 files changed

Lines changed: 848 additions & 225 deletions

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/app_db"

.github/workflows/ci-cd.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Repository checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22.21.0'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Generate Prisma
26+
run: npm run prisma generate
27+
28+
- name: Build
29+
run: npm run build
30+
31+
- name: Run Tests
32+
run: npm run test
33+
34+
- name: Run Lint
35+
run: npm run lint

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
2-
.env
2+
.env*
3+
!.env
34
dist
45
src/generated

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
```sh
66
npm install
7+
docker compose up -d # start postgres
78
npm run prisma generate
8-
docker compose up # start postgres
9+
910
```
1011

1112
## Starting the API
1213

1314
```sh
15+
npm run prisma:reset # reset and reseed the db for dev before starting the dev server
1416
npm run start:dev
1517
```

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default tseslint.config(
2727
'@typescript-eslint/no-explicit-any': 'error',
2828
'@typescript-eslint/no-floating-promises': 'error',
2929
'@typescript-eslint/no-unsafe-argument': 'warn',
30+
'@typescript-eslint/explicit-function-return-type': 'error',
3031
},
3132
},
3233
);

nest-cli.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
"collection": "@nestjs/schematics",
44
"sourceRoot": "src",
55
"compilerOptions": {
6-
"deleteOutDir": true
6+
"deleteOutDir": true,
7+
"plugins": [
8+
{
9+
"name": "@nestjs/swagger",
10+
"options": {
11+
"classValidatorShim": true,
12+
"introspectComments": true
13+
}
14+
}
15+
]
716
}
817
}

0 commit comments

Comments
 (0)