Skip to content

Farha-Dahman/NodeJS-Project

Repository files navigation

Building a Trello-Like App with Express, TypeORM, TypeScript and PostgreSQL Database

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.

Technologies I Use

  • Node.JS
  • Express.JS
  • TypeScript
  • TypeORM
  • PostgreSQL
  • Jest
  • Cypress
  • Eslint
  • Prettier
  • Swagger
  • JWT Authentication

Prerequisites

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.

Getting Started

  1. Clone this repository to your local machine:
 git clone https://github.com/Farha-Dahman/NodeJS-Project.git
  1. Install project dependencies:
 npm install
  1. Create a Postgres database and set your credentials on a .env file, similar to .env.example
  2. Run the application:
 npm run start
  1. open http://localhost:8000/
  2. use curl, postman or other tools to send http requests to test your typeorm-based API

API Documentation

The API documentation is available using Swagger. You can access it locally at http://localhost:8000/api-docs/.

How to use CLI?

  1. install typeorm globally: npm i -g typeorm
  2. run typeorm -h to show list of available commands

Useful 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