This project serves as a practical example of how to build a Trello-like RESTful API using Express.js and TypeORM with TypeScript. It showcases the implementation of these technologies for seamless interaction with a PostgreSQL database, enabling you to create a powerful project management and collaboration tool similar to Trello.
- Node.JS
- Express.JS
- TypeScript
- TypeORM
- PostgreSQL
- Jest
- Cypress
- Eslint
- Prettier
- Swagger
- JWT Authentication
Before you get started, ensure you have the following prerequisites installed on your system:
-
Node.js: Make sure you have Node.js installed. You can download it from nodejs.org.
-
PostgreSQL (PG): Install PostgreSQL and have it running on your machine. You can download it from postgresql.org.
- Clone this repository to your local machine:
git clone https://github.com/Farha-Dahman/NodeJS-Project.git
- Install project dependencies:
npm install
- Create a Postgres database and set your credentials on a
.env
file, similar to.env.example
- Run the application:
npm run start
- open
http://localhost:8000/
- use curl, postman or other tools to send http requests to test your typeorm-based API
The API documentation is available using Swagger. You can access it locally at http://localhost:8000/api-docs/.
- install
typeorm
globally:npm i -g typeorm
- run
typeorm -h
to show list of available commands
- running typeorm migration run
npm run migration:run
- running typeorm create a migration from a model
npm run migration:generate src/migration/migrationName
- running typeorm revert a migration
npm run migration:revert