Installation - dsoj/dsoj GitHub Wiki
Installation
System Requirements
Before you begin, make sure your system meets the following requirements:
- OS: macOS, Linux, or Windows (including WSL).
- Node.js 18 or later.
- Git bash
Clone repository
Make sure you are in an empty folder. Clone the git repository by running:
git clone https://github.com/dscs-club/dsoj.git
cd dsoj
Install dependencies
npm install
Set Up Environment Variables
Edit the .env
file according to the format in .env.example
. Fill in the required environment variables regarding judge0
, session
, mongodb
, JWT
.
## Environment ##
NODE_ENV=development
HOST_URL=localhost:3000
PORT=3000
## DB keys ##
DB_PASSWD=
DB_HOST=
DB_USER=
## session keys ##
JWT_KEY=
SESSION_MAX_AGE=2592000 # 30 days
SESSION_UPDATE_AGE=86400 # 1 day
NEXTAUTH_URL=
# 0 for showing comming soon part
COMMING_SOON=0
## judge0 ##
JUDGE0_HOST=http://127.0.0.1:2358
JUDGE0_CALLBACK_URL=http://127.0.0.1:3000/api/judge0/callback
Run development server
After installing the dependencies and setting the environment variables, you can start the server by running:
npm run dev