This project implements a system similar to Leetcode.com, allowing users to create, edit, delete, read, and test coding questions - supporting coding in the languages python & java. The system is built with a backend API server written in Go using the Gin framework and a frontend built with Nuxt.js.
The system consists of two main components:
The backend API provides endpoints for managing coding questions and running tests. It uses Gin for routing and handling HTTP requests.
The frontend is a web application built with Nuxt.js, providing an intuitive interface for interacting with the system.
git clone https://github.com/miryamW/LeetCode-server.git
cd LeetCode-server
### Set up environment variables
Make sure Kubernetes is enabled in Docker Desktop on your computer.
Create a .env
file in the root directory and add the necessary environment variables. For example:
DATABASE_URL=Your Database URL in the Mongo container.
DATABASE_NAME=Your database name
COLLECTION_NAME=Your collection name in the DB
KUBE_PATH=Your .kube directory location
Make sure to replace the placeholders with your actual values
To start the application locally using Docker Compose, follow these steps:
1.Build and run the application:
docker-compose up --build
This command will build the Docker containers (if not already built) and start the application. The backend system should be accessible at http://localhost:8000 and the frontend system should be accessible at http://localhost:3000.