Skip to content

Commit 00e1432

Browse files
CourtcircuitsTristan Radulescu
and
Tristan Radulescu
authored
docs(GIST-23): add env variable documentation (#7)
Co-authored-by: Tristan Radulescu <[email protected]>
1 parent 1390502 commit 00e1432

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,22 @@ go install github.com/air-verse/air@latest
3636

3737
```bash
3838
# for now none needed
39-
4039
PORT="4000"
4140
PG_USER="postgres"
4241
PG_PASSWORD="postgres"
4342
PG_PORT="5432"
4443
PG_HOST="0.0.0.0"
4544
PG_DATABASE="gists"
45+
PUBLIC_URL="http://localhost:4000"
46+
FRONTEND_URL="http://localhost:3000"
47+
GOOGLE_KEY="<REDACTED>"
48+
GOOGLE_SECRET="<REDACTED>"
49+
GITHUB_KEY="<REDACTED>"
50+
GITHUB_SECRET="<REDACTED>"
51+
MAIL_SMTP="<REDACTED>"
52+
MAIL_PASSWORD="<REDACTED>"
53+
SMTP_PORT="<REDACTED>"
54+
SMTP_HOST="<REDACTED>"
4655
```
4756

4857
4. Run the server
@@ -51,6 +60,22 @@ PG_DATABASE="gists"
5160
air
5261
```
5362

63+
## Configuration
64+
65+
All the configuration is done through env variables :
66+
- `PORT` : the port on which your web server runs
67+
- `PG_USER` : the postgres user
68+
- `PG_PASSWORD` : the postgres password
69+
- `PG_PORT` : the postgres port
70+
- `PG_HOST` : the postgres host
71+
- `PG_DATABASE` : the postgres database
72+
- `PUBLIC_URL` : The URL on which your application is available. If you use a reverse proxy to make your app available, you need to provide its URL thanks to this variable. It is mainly use as the redirection URL used during the authentication flow.
73+
- `FRONTEND_URL` : The URL on which your frontend is available. It is mainly use to set the cookie after the authentication flow
74+
- `GOOGLE_KEY` : your google client key for OAUTH2
75+
- `GOOGLE_SECRET` : your google client secret for OAUTH2
76+
- `GITHUB_KEY` : your github client key for OAUTH2
77+
- `GITHUB_SECRET` : your github client secret for OAUTH2
78+
5479
## Tests
5580

5681
To run tests, execute:

0 commit comments

Comments
 (0)