This project is a backend API built with Node.js and Express, using the SQLite database to store information. Interaction with the database is handled through Knex.js, which facilitates the execution of SQL queries. The API allows users to create, organize and manage notes by associating them with tags and links. Additionally, it offers advanced search functionality by keywords in the title or by tags, and includes operations for creating, updating, listing and deleting users.
# Clone the repository
git clone https://github.com/devmoreir4/notes-api.git
# Navigate to the project directory
cd notes-api
# Install dependencies
npm install
# Run database migrations
npm run migrate
# Start the application
npm start
These are the main API routes.
route | description |
---|---|
POST /users | creates a new user. |
PUT /users/:id | updates an existing user. |
GET /users/:id | retrieves a user's details. |
DELETE /users/:id | deletes a user. |
GET /tags/:user_id | retrieves all tags for a user. |
POST /notes/:user_id | creates a new note for a user. |
GET /notes/:id | retrieves a note by its ID. |
DELETE /notes/:id | deletes a note by its ID. |
GET /notes | retrieves notes based on query parameters. |