This repository contains a simple Node.js Express API with Prisma that uses a PostgreSQL database to manage todos.
Follow these steps to set up the project:
You can use Docker to create a PostgreSQL container. Replace <container>
with your desired container name and <password>
with your chosen PostgreSQL password.
docker run -d \
--name <container> \
-e POSTGRES_PASSWORD=<password> \
-p 5533:5432 \
postgres:latest
npx prisma generate
npx prisma migrate dev
npm install
npm start
curl http://localhost:3000/todos
curl -X POST -H "Content-Type: application/json" -d '{"to_do": "New Task", "done": false}' http://localhost:3000/todos