Skip to content

SexAdapt Backend - | NestJS | TypeORM | Postgres | JWT | Passport | Typescript | Node Mailer | Docker

Notifications You must be signed in to change notification settings

FabioNeves00/sex-adapt-backend

Repository files navigation

Sex Adapt - Back End

Links:

Dependencies:

Setup without docker:

Step 1. sudo su -U postgres psql
Step 2. CREATE DATABASE sex_adapt;
Step 3.	CREATE USER sexadapt WITH PASSWORD 'sexadapt';
Step 4.	GRANT ALL PRIVILEGES ON DATABASE sex_adapt TO sexadapt;

Postgres info:

Docker will be running on port 5432 (default)
Docker container default name is sex-adapt-backend-db

Setup after installing docker:

If you want to load on docker:

1.  sudo docker compose up or docker compose up

If you want to start local:

1. bash ./start.sh
2. yarn install @nestjs/cli && yarn

Local database infos:

Docker will be running on host localhost (default)
Docker will be running on port 5432 (default)
Docker container default name is postgres-sex-adapt

Docker database infos:

Docker will be running on host db (default)
Docker will be running on port 35000 (default)
Docker container default name is sex-adapt-backend-db

Known Errors:

  1. ECONNREFUSED ::1:5432
    • Docker might not be running
      • Solution 1: sudo service run docker;
      • Solution 2: Check your firewall;
  2. error: database "sex_adapt" does not exist
    • Database wasn't created
      • Solution:
        1. Execute docker exec -it postgres-sex-adapt psql -U postgres;
        2. Execute CREATE DATABASE "sex_adapt";
        3. Quit with \q and try again;
  3. error: database "sex_adapt" already exists
    • Database is duplicated
      • Solution:
        1. Restart sex-adapt-backend-db container with: docker run sex-adapt-backend-db

About

SexAdapt Backend - | NestJS | TypeORM | Postgres | JWT | Passport | Typescript | Node Mailer | Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published