Getting Mini Proyecto Backend NodeJS running on your machine takes about five minutes. By the end of these four steps you will have the project dependencies installed, a local MySQL database ready, and the Node.js entry point launched so you can begin implementing the server logic.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.
Prerequisites
Make sure the following are installed and accessible from your terminal before you begin:- Node.js v14 or later — nodejs.org/en/download. Verify with
node -v. - MySQL 5.7+ or MariaDB — a local server instance with a root account you can connect to without a password (matching the default project configuration), or credentials you can update.
- npm — ships with Node.js. Verify with
npm -v.
Setup Steps
Install Dependencies
The project has a single runtime dependency — After installation your The relevant section of
mysql2 — declared in package.json. Install it with:node_modules folder will contain mysql2 and its bundled bindings. You can confirm the installed version:package.json that drives this:Configure the Database
The project connects to a database named Run that statement from the MySQL shell (If your MySQL root account has a password, update the
ejemploformulario on localhost using the root account with no password. Create the database in MySQL before starting the server:mysql -u root) or any MySQL client such as MySQL Workbench or DBeaver.Here is the full conexion.js file that manages the connection — no changes are needed if your local MySQL matches the defaults above:password field in conexion.js before moving to the next step.Implement server.js and Start the Server
server.js ships as an empty file — writing the HTTP server logic is the hands-on goal of this SENA ADSO exercise. Your implementation must:require('./conexion')to obtain the shared MySQL connection.- Listen on a local port (for example
3000). - Serve
index.htmlonGET /. - Parse the URL-encoded form body and insert
nombreandapellidoonPOST /recuperardatos.
node server.js. If conexion.js is required correctly, a successful database connection prints:http://localhost:3000 (or whichever port your implementation binds to) to see the Registro Tienda Parque 100 HTML form. Fill in the Nombre and Apellido fields and click Enviar to POST the form data to /recuperardatos.server.js is the student’s implementation file. The repository ships it as an empty file — writing the HTTP server logic (listening on a port, routing GET / to serve index.html, and handling POST /recuperardatos to insert form data) is the hands-on part of the SENA ADSO exercise. conexion.js and index.html are provided as ready-to-use building blocks.