A web application for creating and managing notes using Node.js, Express.js, Sequelize (MySQL), Redis, and Docker.
This project is a "Note Taking" application that allows users to create, retrieve, update, and delete notes. It is built using modern JavaScript technologies, including Node.js, Express.js, Sequelize (MySQL), Redis for caching, and Docker for containerization.
- User registration and authentication
- Create, retrieve, update, and delete notes
- Utilizes Sequelize ORM for MySQL interactions
- Redis caching for improved performance
- Dockerized application for easy deployment
- Node.js (version 18)
- MySQL database
- Redis server
- Docker (optional)
-
Clone this repository:
git clone https://github.com/mirimadahmed/notes-api.git
-
Install dependencies:
cd notes-api npm install -
Set up environment variables:
- Create a
.envfile based on.env.sampleand configure database and Redis connection settings.
- Create a
-
Run migrations:
npm run migrate
-
Start the server:
npm run start
-
Access the API at:
http://localhost:3000
- POST /api/auth/signup: Register a new user.
- POST /api/auth/login: Authenticate a user and get an authentication token.
- POST /api/notes: Create a new note.
- GET /api/notes: Retrieve all notes for the authenticated user.
- GET /api/notes/:noteId: Retrieve a specific note.
- PUT /api/notes/:noteId: Update a note.
- DELETE /api/notes/:noteId: Delete a note.
Postman API Docs Export JSON is in the root directory.