Skip to content

Commit 35989cf

Browse files
committed
feat: api routing to typed router + OpenAPI generation
1 parent 2b6ee7c commit 35989cf

105 files changed

Lines changed: 6145 additions & 8902 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: npm run format
2929

3030
- name: Run Tests with Coverage
31-
run: npm test -- --coverage
31+
run: npm run coverage
3232

3333
- name: Run type checks
3434
run: npm run typecheck

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tests
2+
src
3+
vitest.config.ts
4+
tsconfig.json

.sequelizerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require('dotenv').config();
33
const path = require('path');
44

55
module.exports = {
6-
config: path.resolve('src/config/config.js'),
6+
config: path.resolve('src/config/config.cjs'),
77
'models-path': path.resolve('src/models'),
88
'seeders-path': path.resolve('src/seeders'),
99
'migrations-path': path.resolve('src/migrations'),

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ RUN npm ci
1212
COPY . .
1313
RUN npm run build
1414

15+
RUN npm prune --omit=dev
16+
1517
# ---------- Runtime stage ----------
1618
FROM node:20-slim AS runner
1719
WORKDIR /app
@@ -21,10 +23,10 @@ RUN useradd -m appuser
2123
COPY validateEnvs.sh /usr/local/bin/validateEnvs.sh
2224
RUN chmod +x /usr/local/bin/validateEnvs.sh
2325

24-
COPY package*.json ./
25-
RUN npm install --omit=dev && npm cache clean --force
26-
26+
COPY --from=builder /app/package*.json ./
27+
COPY --from=builder /app/node_modules ./node_modules
2728
COPY --from=builder /app/dist ./dist
29+
COPY --from=builder /app/src/config ./src/config
2830
COPY --from=builder /app/src/migrations ./src/migrations
2931
COPY --from=builder /app/.sequelizerc ./.sequelizerc
3032

@@ -40,4 +42,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
4042

4143
USER appuser
4244

43-
ENTRYPOINT ["/usr/local/bin/validateEnvs.sh"]
45+
ENTRYPOINT ["/usr/local/bin/validateEnvs.sh"]

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /app
55
RUN apk add --no-cache postgresql-client netcat-openbsd
66

77
COPY package.json package-lock.json* ./
8-
RUN npm i
8+
RUN npm ci
99

1010
COPY . .
1111
RUN mkdir -p ./keys

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
postgres:
1818
condition: service_healthy
1919
healthcheck:
20-
test: ['CMD', 'node', 'dist/healthCheck.js']
20+
test: ['CMD', 'node', './healthCheck.js']
2121
interval: 30s
2222
timeout: 5s
2323
retries: 3

0 commit comments

Comments
 (0)