Overview
This API provides endpoints to manage teams, solar system data, and tutorials for the Solar System Game project. It is built using Node.js and MongoDB.
Authentication
The API uses JWT-based authentication. Pass the token in the Authorization header for protected routes.
POST /login
Body:
{
"username": "your_username",
"password": "your_password"
}
Response:
{
"token": "your_jwt_token"
}
Endpoints
GET /team
Returns information about the logged-in team.
GET /solar/:id
Returns details about a solar system by its ID.
GET /tutorial
Returns the tutorial content for the team.
Example Usage
fetch('/team', {
method: 'GET',
headers: {
'Authorization': 'Bearer your_jwt_token'
}
}).then(response => response.json())
.then(data => console.log(data));