Welcome to the Web Game Developers Platform Backend repository! This Node.js-based backend application provides the server-side functionality for the Web Game Developers Platform, including API endpoints for game management, user authentication, and more.
The Web Game Developers Platform Backend is a RESTful API built with Node.js and Express. It handles requests from the frontend application, manages data persistence with MongoDB, and ensures secure user authentication using JWT.
- API Endpoints: Comprehensive API for managing games, user profiles, and authentication.
- Authentication: Secure login and registration using JWT for token-based authentication.
- Database Integration: Connects to MongoDB for storing user and game data.
- CRUD Operations: Create, read, update, and delete operations for games and user profiles.
- Environment Configuration: Configurable settings through environment variables.
To get started with the backend project, follow these steps:
-
Clone the repository:
cd Web-Game-Developers-Platform-Backend -
Navigate to the project directory:
cd Web-Game-Developers-Platform-Backend -
Install Dependencies:
npm install
-
Create a
.envfile for environments variables:PORT=5000 MONGODB_URI=mongodb://localhost:27017/mydatabase JWT_SECRET=your_jwt_secret
-
Start the server:
npm start
- API Documentation: Use tools like Postman or Swagger to interact with and test the API endpoints.
- Base URL: The base URL for API requests is http://localhost:5000/api.
-
Environment Variables: Configure the following environment variables in your
.envfile:PORT=5000 MONGODB_URI=mongodb://localhost:27017/mydatabase JWT_SECRET=your_jwt_secret
Adjust
PORT,MONGODB_URI, andJWT_SECRETas needed.
-
Unit Tests: Place your unit tests in the
testsdirectory. These tests should cover various parts of your application to ensure its functionality and reliability. -
Running Tests: To run the test suite, use the following command:
npm test
This project is licensed under the MIT License.