Rondaze Backend is a Node.js application that connects to a Supabase database to manage high scores for a game. This project uses Express.js for the server framework and Supabase for the database.
rondaze-backend
├── src
│ ├── server.js # Entry point of the application
│ ├── controllers
│ │ └── highScoresController.js # Handles high scores logic
│ ├── routes
│ │ └── highScoresRoutes.js # Defines routes for high scores
│ └── db
│ └── supabaseClient.js # Configured Supabase client
├── package.json # NPM configuration file
├── .env # Environment variables
└── README.md # Project documentation
-
Clone the repository:
git clone <repository-url> cd rondaze-backend
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and add your Supabase credentials:SUPABASE_URL=<your-supabase-url> SUPABASE_KEY=<your-supabase-api-key>
-
Start the server:
npm start
- Endpoint:
GET /highscores
- Description: Retrieves the list of high scores from the database.
- Endpoint:
POST /highscores
- Description: Adds a new high score to the database.
- Request Body:
{ "name": "PlayerName", "score": 100 }
This project is licensed under the MIT License.