Skip to content

Commit 293e27e

Browse files
config updates
Signed-off-by: Arnav Gupta <arnav@codingblocks.com>
1 parent 2ec5278 commit 293e27e

File tree

3 files changed

+22
-24
lines changed

3 files changed

+22
-24
lines changed

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,17 @@ If using a fresh db, seed the languages before testing
2828
npm run build
2929
npm run seedlangs
3030
```
31+
32+
33+
## Requirements
34+
35+
### Database (Postgres)
36+
We need a PostgreSQL database to run. Please configure the following env variables -
37+
38+
```env
39+
DB_NAME='judgeapi',
40+
DB_USER='judgeapi',
41+
DB_PASS='judgeapi',
42+
DB_HOST='localhost'
43+
```
44+
### Queue (RabbitMQ)

config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@ exports = module.exports = {
22
RUN: {
33
TIMEOUT: process.env.RUN_TIMEOUT || 10000,
44
},
5+
6+
// Domain/Host on which judge-api is hosted
57
HOST: process.env.JUDGEAPI_HOST || 'localhost',
8+
// Port on which this app will run
69
PORT: process.env.JUDGEAPI_PORT || 3737,
10+
11+
// Database config for a postgresql db (docker based or native)
712
DB: {
813
DATABASE: process.env.DB_NAME || 'judgeapi',
914
USERNAME: process.env.DB_USER|| 'judgeapi',
1015
PASSWORD: process.env.DB_PASS|| 'judgeapi',
1116
HOST: process.env.DB_HOST || 'localhost'
1217
},
18+
19+
// Rabbit MQ queue - the other end of which is attached
20+
// to judge-taskmaster
1321
AMQP: {
1422
USER: process.env.AMQP_USER || 'codingblocks',
1523
PASS: process.env.AMQP_PASS || 'codingblocks',

0 commit comments

Comments
 (0)