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
+29-11Lines changed: 29 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ IQPS was originally created by [Shubham Mishra](https://github.com/grapheo12) in
60
60
- Make the env file by copying the template: `cp .env.template .env`
61
61
- Fill the env variable and set `DB_HOST=localhost` for running locally for development
62
62
- Start the DB by running `docker compose -f docker-compose.dev.yaml up -d`
63
-
- Start the Go backend by running `go run .`
63
+
- Start the Rust backend by running `cargo run .`
64
64
3. Set up the frontend by running `pnpm install` and then `pnpm start` in the `frontend/` directory.
65
65
4. Profit.
66
66
@@ -77,20 +77,38 @@ IQPS was originally created by [Shubham Mishra](https://github.com/grapheo12) in
77
77
5. Optionally set up a Systemd service to start the wiki on startup or use this [deployment github workflow](./.github/workflows/deploy.yaml).
78
78
79
79
### Environment Variables
80
-
Environment variables can be set using a `.env` file. Use the `.env.template` files for reference.
80
+
Environment variables can be set using a `.env` file. Use the `.env.template` files for reference. See `backend/src/env.rs` for more documentation and types.
81
81
82
82
#### Backend
83
-
-`DB_PATH`: Path to the database file to use.
84
-
-`STATIC_FILES_URL`: The base URL for the static files (PDFs).
85
-
-`QPS_PATH`: The local path on the server to store question paper PDFs.
86
-
-`DB_NAME`: The name for your database.
87
-
-`DB_HOST`: `localhost` if using local postgres server or set your **own** database host address.
88
-
-`DB_PORT`: `5432` if using local postgres server, or set to your **own** database port.
89
-
-`DB_USER`: The access username for database.
90
-
-`DB_PASSWORD`: The access password corressponding to the user.
83
+
##### Database (Postgres)
84
+
-`DB_NAME`: Database name
85
+
-`DB_HOST`: Database hostname (eg: `localhost`)
86
+
-`DB_PORT`: Database port
87
+
-`DB_USER`: Database username
88
+
-`DB_PASSWORD`: Database password
89
+
90
+
##### Authentication
91
+
-`GH_CLIENT_ID`: Client ID of the Github OAuth app.
92
+
-`GH_CLIENT_SECRET`: Client secret of the Github OAuth app.
93
+
-`GH_ORG_NAME`: The name of the Github organization of the admins.
94
+
-`GH_ORG_TEAM_SLUG`: The URL slug of the Github org team of the admins.
95
+
-`JWT_SECRET`: A secret key/password for JWT signing. It should be a long, random, unguessable string.
96
+
97
+
##### Configuration
98
+
-`MAX_UPLOAD_LIMIT`: Maximum number of files that can be uploaded at once.
99
+
-`LOG_LOCATION`: The path to a local logfile.
100
+
-`STATIC_FILES_URL`: The URL of the static files server. (eg: `https://static.metakgp.org`)
101
+
-`STATIC_FILE_STORAGE_LOCATION`: The path to the local directory from which the static files are served.
102
+
-`UPLOADED_QPS_PATH`: A path relative to `STATIC_FILE_STORAGE_LOCATION` where the uploaded question papers will be stored. (eg: `iqps/uploaded`)
103
+
-`LIBRARY_QPS_PATH`: A path relative to `STATIC_FILE_STORAGE_LOCATION` where the library question papers are scraped and stored. (eg: `peqp/qp`)
104
+
-`SERVER_PORT`: The port on which the server listens.
105
+
-`CORS_ALLOWED_ORIGINS`: A comma (,) separated list of origins to be allowed in CORS.
91
106
92
107
#### Frontend
93
-
-`VITE_BACKEND_URL`: The IQPS backend URL. Use `http://localhost:5000` in development.
108
+
-`VITE_BACKEND_URL`: The IQPS backend URL. Use `http://localhost:8080` in development.
109
+
-`VITE_MAX_UPLOAD_LIMIT` The maximum number of files that can be uploaded at once. (Note: This is only a client-side limit)
110
+
-`VITE_GH_OAUTH_CLIENT_ID` The Client ID of the Github OAuth app.
0 commit comments