A simple Todo List application built with Express.js, Prisma, Swagger, and MySQL2.
- Express.js - Backend framework
- Prisma - ORM for database management
- Swagger - API documentation
- MySQL2 - MySQL client for Node.js
Follow these steps to set up and run the application:
-
Clone the repository
git clone https://github.com/stanislavstru/test-task-server-part.git ./
-
Install Dependencies
Run the following command to install all necessary dependencies:
npm install
-
Setup environment variables
- Rename
example.env
to.env
. - Update
DATABASE_URL
with your database connection string.
- Rename
-
Run database migrations
npm run prisma:migrate:dev
-
Build the project
npm run build
-
Start the server
npm start
-
Check if the server is running
- You should see:
🚀 Server running on http://localhost:8000
- Open Swagger documentation at: http://localhost:8000/swagger
- You should see:
This project uses Swagger for API documentation. Once the server is running, visit http://localhost:8000/swagger to explore available endpoints.
This project is licensed under the MIT License.