Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/luisllatas-dev/Proyecto_Pasteleria_DonMamino/llms.txt

Use this file to discover all available pages before exploring further.

The Don Mamino API is a Node.js/Express application backed by MySQL. Follow the steps below to get a local instance running on your machine in under ten minutes.

Prerequisites

Before you begin, make sure the following are installed:
You can verify your versions with node -v and mysql --version before proceeding.

Setup steps

1

Clone the repository

Clone the project from GitHub and move into the project directory.
git clone https://github.com/luisllatas-dev/Proyecto_Pasteleria_DonMamino.git
cd Proyecto_Pasteleria_DonMamino
2

Install dependencies

Install all required npm packages.
npm install
This installs express, mysql2, jsonwebtoken, bcryptjs, dotenv, cors, and the nodemon dev dependency.
3

Create the database and run the schema

Connect to your MySQL instance and execute the schema file to create the don_mamino_db database and all tables.
mysql -u root -p < database/schema.sql
The schema creates the database automatically with CREATE DATABASE IF NOT EXISTS don_mamino_db, so you do not need to create it manually beforehand.
4

Create the .env file

Create a .env file in the project root with the following variables. Replace the placeholder values with your actual MySQL credentials and a secure secret string for JWT signing.
.env
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=don_mamino_db
DB_PORT=3306
JWT_SECRET=your_super_secret_key
Never commit your .env file to version control. Add it to .gitignore if it is not already there.
VariableDescription
DB_HOSTHostname of your MySQL server
DB_USERMySQL user with access to don_mamino_db
DB_PASSWORDPassword for the MySQL user
DB_NAMEDatabase name (don_mamino_db)
DB_PORTMySQL port (default: 3306)
JWT_SECRETSecret key used to sign and verify JWT tokens
5

Start the server

Choose between development mode (auto-restarts on file changes) or production mode.
npm run dev
When the server starts successfully, you will see:
Servidor corriendo en http://localhost:3000
✅ Conexión a la base de datos MySQL (don_mamino_db) establecida correctamente.
Use npm run dev during development. It uses nodemon to watch for file changes and restart the server automatically.

Verify the setup

Once the server is running, confirm it is healthy with a request to the health endpoint.
curl http://localhost:3000/api/health
Expected response:
{ "status": "ok" }
A 200 OK response confirms the server is up and connected to the database. You are now ready to make authenticated API requests.

Build docs developers (and LLMs) love