This is a simple todo backend app built with NestJS.
There's also a front-end project that's developed in pair with this one. It can be accessed at https://github.com/asajim/todo-app-nextjs.
- Create todo items where title is required and deadline is optional
- Update a todo item (change its title, add/remove deadline, mark it as done)
- Remove a todo item
- All functionalities are accessible to API endpoint and
protected through basic authentication, except the health check endpoint (
GET /
). Username and password used for the basic authentication are defined in.env
file.
- Install Node.js and NPM.
- Use Node 18 (if you have nvm installed, you can do it by typing
nvm use 18
) - Install the dependencies:
$ npm install
- Run the database
$ docker-compose up -d
- Start the development server:
$ npm run start:dev
- Open your browser and navigate to
http://localhost:8080
.
- NestJS
NestJS is selected because it offers several advantages compared to ExpressJS, such as- Modular architecture
- Dependency injection
- Built-in testing
- TypeScript support
- Supports for various tools, such as Swagger, GraphQL, TypeORM, etc.
- TypeScript
- PostgreSQL
- No setup for production. Everything are still based on development setup.
- More testing, both unit testing but also end-to-end testing
- Add more feature
- Add more documentation