/duel

Duel is a dynamic gaming platform that lets players engage in real-time battles. Compete against others, showcase your skills, and rise through the ranks in an exhilarating, fast-paced environment. Duel is designed for those who thrive on competition and crave the thrill of victory.

Primary LanguageTypeScript

Duel

Welcome to Duel 👋

Duel is a dynamic gaming platform that lets players engage in real-time battles. Compete against others, showcase your skills, and rise through the ranks in an exhilarating, fast-paced environment. Duel is designed for those who thrive on competition and crave the thrill of victory..# Duel

Install

To install packages in both the server and frontend folder:

  • cd server
npm install
  • cd frontend
npm install
  • Do not forget to change .Env variable in both SERVER and FRONTEND before running

This repo uses nodemailer, so to use it add your email in the ADMIN_EMAIL and same email security_key in the ADMIN_EMAIL_PASS to send email as admin

* SERVER
PORT= 5000
DATABASE_URL=YOUR_DATABASE_URL
ADMIN_EMAIL=YOUR_EMAIL
ADMIN_EMAIL_PASS=YOUR_EMAIL_SECURITYKEY
REDIS_HOST=localhost || if you are using any cloud service
APP_URL=http://localhost:5000
CLIENT_APP_URL=http://localhost:3000
JWT_SECRET=use your jwt secret

* FRONTEND
APP_URL=http://localhost:3000
BACKEND_APP_URL=http://localhost:5000

NEXTAUTH_URL=http://localhost:3000
- Update NEXTAUTH_SECRET
NEXTAUTH_SECRET=use your NEXTAUTH_SECRET 
  • To run this repo locally on your machine use Docker for both Redis and PostgreSql
- Navigate to the root of the project:
# Start the services:
docker-compose up -d
# Check the status of the containers:
docker-compose ps

# Change the variables in the docker-compose.yml file

Usage

  • To run the server
npm run dev
  • For frontend
npm run dev

Run tests

 k6 run load_test.js

Author

👤 Suryakanta Das