Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 806500c

Browse files
authored
feat(api): create CURRENT_COURSE_ID env variable (#325) (#331)
1 parent cae40d4 commit 806500c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/code-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
APP_ENV: review
1616
DATABASE_URL: postgresql://root:root@localhost:5432/main-db
1717
PORT: 4000
18+
CURRENT_COURSE_ID: CodersCamp_7
1819
JWT_SECRET: kljsr89qwh89YT89gvedstfg
1920
TOKEN_EXPIRATION_TIME: 3600
2021
TOKEN_PREFIX: Bearer

packages/api/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ NODE_ENV="development"
22
APP_ENV="local"
33
DATABASE_URL="postgresql://root:root@localhost:5432/main-db"
44
PORT=4000
5+
CURRENT_COURSE_ID="CodersCamp_7"
56

67
JWT_SECRET="d1XpBRk6buB217lwzQp1TAK3oB29ydy5oEKhI6y0Ec71ByC3MVAkUfkL3TCUTqM"
78
TOKEN_EXPIRATION_TIME=3600

packages/api/src/shared/env.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ class EnvVariables {
2727
@IsPositive()
2828
PORT: number;
2929

30+
@Expose()
31+
@IsString()
32+
@IsNotEmpty()
33+
CURRENT_COURSE_ID: string;
34+
3035
@Expose()
3136
@IsString()
3237
@IsNotEmpty()

0 commit comments

Comments
 (0)