descriptionSchool Project: Votar (JavaScript: Express)
owneransi25.a2ncu@slmail.me
last changeMon, 20 Oct 2025 02:29:15 +0000 (19 23:29 -0300)
content tags
README.md

Votar REST API (Express)

Implementation of the Votar OpenAPI Description using Express.

Core Dependencies

To ensure optimal performance and functionality, the following Node.js and NPM versions are required:

You can use nvm to install them, or use the following command if you're using Debian:

sudo apt install nodejs

Verify the installed versions using the following commands:

node -v
npm -v

Application Dependencies

Install the application's dependencies using npm:

npm install

Running the Application

To run the application, execute the following command:

node restapi.js

To make things easier while you code, you can use the next command to restart the server automatically when you make changes. This uses something called npm scripts and a tool called nodemon. Nodemon watches for changes and restarts the server for you.

npm run dev

SQLite

Inside the sqlite directory, run the following command to create the database from the SQL file.

sqlite3 -bail votar.db < votar.sql
shortlog
2025-10-20 Juan Manuel... Merge branch 'database' into nodemasternode
2025-10-20 Juan Manuel... Logic for TDD 007 `POST /voto`
2025-10-20 Juan Manuel... Logic for TDD 006 `GET /informe`
2025-10-20 Juan Manuel... Logic for TDD 005 `GET /elementos/:id` (404)
2025-10-20 Juan Manuel... Logic for TDD 005 `DELETE /elementos/:id`
2025-10-20 Juan Manuel... Logic for TDD 004 `GET /elementos/:id`
2025-10-20 Juan Manuel... Logic for TDD 003 `PATCH /elementos/:id`
2025-10-20 Juan Manuel... Logic for TDD 002 `POST /elementos`
2025-10-20 Juan Manuel... Logic for TDD 001 `GET /elementos`
2025-10-20 Juan Manuel... Update minimum required Node.js version
2025-10-20 Juan Manuel... Load SQLite database
2025-10-20 Juan Manuel... Ignore SQLite database
2025-10-20 Juan Manuel... Document how to build the SQLite database
2025-10-20 Juan Manuel... Add SQLite SQL script
2025-10-20 Juan Manuel... Merge branch 'happy-path' into node
2025-10-20 Juan Manuel... Update default HTTP status code to 404
...
heads
6 weeks ago node
6 weeks ago master
6 weeks ago deno