This is the backend repository for the Pro Chess application. The backend is responsible for handling game logic, user authentication, and interaction with the MongoDB database. It provides the necessary APIs for the frontend to communicate with and manage chess games.
To set up and run the Pro Chess backend, follow these steps:
-
Clone this repository:
git clone https://github.com/ashvinck/pro-chess-backend.git cd pro-chess-backend
-
Install Dependencies
npm install
-
Configure the environment variables
- Create a .env file in the root directory and specify the following variables:
- MONGO_URI: MongoDB connection string
- PORT: Port for the server to listen on
-
Start the server
npm run dev
The backend provides the following endpoints:
/play/computer/save
: for single-player game management.
The Pro Chess backend uses the following main dependencies:
- Express.js: Web application framework for Node.js.
- Mongoose: MongoDB object modeling tool.
- CORS: Middleware for handling cross-origin requests.
- Http-Errors: For better error handling throughout appliation.
I welcome contributions to the Pro Chess backend! If you have ideas for improvements, bug fixes, or new features, please open an issue or submit a pull request.
This project is licensed under the MIT License.
The link to the frontend repo can be found here.
- Multi-player support