Welcome to the backend documentation for our open-source project. This document provides an overview of the backend structure, API routes, and how to contribute to the project.
The backend folder is organized into several directories, each serving a specific purpose:
/backend
/contest
/controllers # Logic for handling API requests related to contests
/models # Database models for contests
/routes # API route definitions for contests
/user
/controllers # Logic for handling API requests related to users
/models # Database models for users
/routes # API route definitions for users
/middlewares # Custom middleware functions specific to users
/services # Reusable services and utilities specific to users
index.js # Main server file
- Clone the repository:
git clone https://github.com/pranshugupta54/digitomize.git
- Navigate to the backend directory:
cd digitomize/backend
- Install dependencies:
npm install
Configure your environment variables in the .env
file. This file should contain sensitive information and configurations that your application needs, such as database connection strings, API keys, and more.
TEST=Env file connected.
MONGODB_URL=mongodb://localhost:27017/digitomize
PORT=4001
BACKEND_URL=http://localhost:4001
CONTESTS=true
USERS=true
NODE_ENV=development
# Firebase Configuration
FIREBASE_CREDENTIALS= # you need to add JSON for this
Start the server: npm start