Skip to content

Commit 14b8abe

Browse files
committed
Feat: Add env in gitignore
- Set env typescript - Add comment about env related in README
1 parent 7025884 commit 14b8abe

File tree

7 files changed

+39
-27
lines changed

7 files changed

+39
-27
lines changed

.development.env

-19
This file was deleted.
File renamed without changes.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,7 @@ lerna-debug.log*
3535
!.vscode/extensions.json
3636

3737
.env
38+
*.env
39+
!.example.env
3840

3941
test/graphql-schema.gql

.test.env

-7
This file was deleted.

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ or run with docker following below
161161

162162
Download docker from [Official website](https://docs.docker.com/compose/install)
163163

164+
### Before getting started
165+
166+
Before running Docker, you need to create an env file named `.production.env`.
167+
The content should be modified based on `.example.env`.
168+
The crucial point is that DB_HOST must be set to 'postgres'.
169+
164170
### Run
165171

166172
Open terminal and navigate to project directory and run the following command.
@@ -183,6 +189,12 @@ You can just create postgresql by below code, sync with .development.env
183189
$ docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=1q2w3e4r -d postgres
184190
```
185191

192+
## TDD
193+
194+
### Before getting started
195+
196+
Before starting the test, you need to set at least jwt-related environment variables in an env file named `.test.env`.
197+
186198
## Todo
187199

188200
- [ ] TDD

additional.d.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
declare namespace NodeJS {
2+
interface ProcessEnv {
3+
DB_HOST: string;
4+
DB_PORT: string;
5+
DB_USER: string;
6+
DB_PASSWORD: string;
7+
DB_NAME: string;
8+
PORT: string;
9+
JWT_PRIVATE_KEY: string;
10+
JWT_PUBLIC_KEY: string;
11+
AWS_S3_ACCESS_KEY: string;
12+
AWS_S3_SECRET_KEY: string;
13+
AWS_S3_REGION: string;
14+
AWS_S3_BUCKET_NAME: string;
15+
}
16+
}

tsconfig.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,13 @@
1717
"strictBindCallApply": false,
1818
"forceConsistentCasingInFileNames": false,
1919
"noFallthroughCasesInSwitch": false
20-
}
20+
},
21+
"include": [
22+
"additional.d.ts",
23+
"**/*.ts",
24+
"**/*.tsx",
25+
],
26+
"exclude": [
27+
"node_modules"
28+
],
2129
}

0 commit comments

Comments
 (0)