You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+26-1
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,22 @@ go install github.com/air-verse/air@latest
36
36
37
37
```bash
38
38
# for now none needed
39
-
40
39
PORT="4000"
41
40
PG_USER="postgres"
42
41
PG_PASSWORD="postgres"
43
42
PG_PORT="5432"
44
43
PG_HOST="0.0.0.0"
45
44
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>"
46
55
```
47
56
48
57
4. Run the server
@@ -51,6 +60,22 @@ PG_DATABASE="gists"
51
60
air
52
61
```
53
62
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
0 commit comments