This is a simple todo list API.
- Nodejs + ExpressJS
- Typescript
- Prisma
- Zod
- Swagger
To get a local copy up and running follow these simple steps.
- Nodejs + NPM
- PostgreSQL
- Redis
- Docker(optional)
-
Clone the repository
git clone https://github.com/tb0se/todo-list-api.git
-
Ensure you create a
.env
file in the root of the project directory with the following environment variablesPORT=5000 JWT_SECRET="supersecret" NODE_ENV='development'
-
Install the required dependencies:
yarn
The following additional environmental variables are required:
DATABASE_URL="postgresql://user:password@postgres:5432/tododb"
REDIS_URL="redis://redis:6379"
Start the containers required with the following command:
docker compose up
Ensure you have installed and configured:
- PostgreSQL server
- Redis server
The following additional environmental variables are required:
DATABASE_URL="postgresql://user:password@localhost:5432/tododb"
REDIS_URL="redis://localhost:6379"
-
Start the dev server
yarn dev
Runs the app in the development mode. Open http://localhost:5000/api-docs to view it in the browser.