A RESTful API developed with Node.js, Express, Sequelize, and MySQL, that allows you to query, create, edit, and delete complete poems written by women poets from Latin America. Ideal for educational or cultural purposes. β€οΈ
- Node.js β JavaScript runtime environment
- Express β web framework for Node.js
- Sequelize β ORM for SQL databases
- MySQL β database management system
- MySQL Workbench β graphical tool for creating and managing databases
- dotenv β environment variable management
poetisas-db/
βββ src/
β βββ models/ # Sequelize model (Poema.js)
β βββ routes/
β β βββ poemas/ # CRUD routes separated by action
β β βββ index.js # Main router
β βββ database.js # MySQL connection with Sequelize
β βββ app.js # Express server
βββ .env # Environment variables (do not commit to GitHub)
βββ package.json # Project dependencies
βββ README.md # Documentation
- Clone this repository
- Make sure you have MySQL running and have created the
poetisasdatabase with thePoemastable - Create a
.envfile in the project root with your connection credentials:
DB_NAME=poetisas
DB_USER=root
DB_PASS=your_password
DB_HOST=localhost
DB_DIALECT=mysql
PORT=3006- Install dependencies:
npm install- Start the server:
node src/app.js| Method | Route | Description |
|---|---|---|
| GET | /poemas |
Retrieve all poems |
| GET | /poemas/:id |
Retrieve a poem by ID |
| POST | /poemas |
Create a new poem |
| PUT | /poemas/:id |
Update an existing poem |
| DELETE | /poemas/:id |
Delete a poem by ID |
{
"titulo": "Canto a la vida",
"autora": "Gabriela Mistral",
"pais": "Chile",
"aΓ±o": 1938,
"poema": "Vida, nada me debes, vida estamos en paz..."
}This project was created step by step on my channel, where I teach programming, APIs, and web development with real and creative examples.
π @alienexplorer
Created by @alienexplorer
Educational and cultural project to showcase works by Latin American women poets.
Inspired by the idea of building APIs with purpose and artistic sensitivity β¨
This project is shared for educational and non-commercial purposes.
All poems are in the public domain or cited for educational purposes.