- Install Node.js v20.11.1;
- Run the following commands:
cp .env.example .env
mkdir data
sudo chmod -R 777 data
yarn install
docker-compose -f docker-compose.yml down
docker-compose -f docker-compose.yml up -d
yarn dev
- Create a new migration:
npx typeorm migration:create -n AlterTableNameColumnDescription
- Add the new migration created in this file
src/core/db/migrations/index.ts
.
The folder structure must follow the pattern:
--- src
------ modules
--------- user // DTOs, Use Cases and Controller from App User
--------- index.ts // The main controller. We need to import all controllers here
The purpose of this project is to learn and practice Clean Code and the following stack:
- Node.js;
- Typescript;
- Docker;
- Clean Code;
- PostgreSQL;
- TypeORM;
- Integration with external APIs.
Here we integrate with the TMDB API to query Trending Movies, map and save a local PostgreSQL database, using TypeORM.
To test, there are two cURLs below: