The Chess Game API provides endpoints for managing users, tournaments, and matches in a chess game application. This API is built using Express.js, MongoDB, and TypeScript, offering a robust and scalable solution for managing chess game data.
- Express.js: Web framework for Node.js
- MongoDB: NoSQL database for data storage
- TypeScript: Superset of JavaScript for type safety and modern features
- Swagger: API documentation
-
Clone the repository:
git clone https://github.com/Nurbek12/chess-api
-
Navigate to the project directory:
cd chess-game-api
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env
file in the root directory and configure the required variables (e.g., database connection string, JWT secret). -
JWT_ACCESS_SECRET = JWT_REFRESH_SECRET = MONGODB_URI = PORT =
- Create a
-
Build the application
npm run build
-
Run the application:
npm start
To run tests, use:
npm test