Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/brandonvergara1220-del/Mini-Proyecto-Backend-NodeJS/llms.txt

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

Mini Proyecto Backend NodeJS (GA7-220501096-AA2-EV02) is a compact SENA ADSO learning project that demonstrates a full request-to-database cycle using Node.js and MySQL. The codebase is intentionally minimal — four files handle everything from serving the HTML registration form to persisting submitted data — making it an ideal starting point for understanding how the pieces of a backend application fit together.

File Tree

Mini-Proyecto-Backend-NodeJS/
├── server.js          # HTTP server entry point (currently empty — to be implemented)
├── conexion.js        # mysql2 connection module
├── index.html         # HTML registration form served to the browser
├── package.json       # npm project manifest and dependency list
└── package-lock.json  # Locked dependency tree (auto-generated)

File Roles

FileRole
server.jsEntry point started by npm start (node server.js). This file is currently empty and is where the HTTP server, route handler for POST /recuperardatos, and response logic are meant to be added.
conexion.jsCreates a single, reusable mysql2 connection to the ejemploformulario database and exports it for use by server.js.
index.htmlA static HTML page containing the registration form for Tienda Parque 100. Submits nombre and apellido to the backend via POST.
package.jsonDeclares the project name (mini-proyecto), main pointing to index.html, the start script (node server.js), and the single runtime dependency — mysql2 ^3.22.5.
package-lock.jsonAuto-generated lockfile that pins the exact versions of all transitive dependencies for reproducible installs.

Data Flow

The full journey of a form submission through the application follows this path:
Browser

  │  1. GET /  →  serve index.html

index.html (HTML form)

  │  2. User fills in nombre + apellido, clicks "Enviar"
  │     Browser sends: POST /recuperardatos

server.js (entry point — implementation pending)

  │  3. [To be implemented] Parse the POST body
  │  4. [To be implemented] Call conexion.query() to INSERT data

conexion.js (mysql2 connection)

  │  5. Executes SQL against the local MySQL server

MySQL — ejemploformulario database
Each layer has a distinct responsibility: the HTML form handles user input, server.js will handle routing and business logic once implemented, and conexion.js handles the database communication. This separation keeps the project easy to read and extend.

Explore Each Layer

Database Connection

Deep-dive into conexion.js — how the mysql2 connection is configured, established, and exported for use across the application.

HTML Frontend

Explore the index.html registration form — its fields, form action, and how submitted data travels to the backend route handler.

Build docs developers (and LLMs) love