Skip to content

Daniil2801/nest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project setup

$ npm install

Compile and run the project

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Build and run Docker container

# build
$ docker compose build --no-cache

# run
$ docker compose up -d

Swagger

localhost:3000/api/docs

To test all functionality

Register an account using POST /auth/register according to Swagger

If you're using docker container then execute following comands

# Open psql in docker
$ docker compose exec db psql -U postgres -d shop

# Update role for registered user
$ UPDATE "User" SET role = 'ADMIN' WHERE email = 'registeredEmail@gmail.com';

# Check
$ SELECT id, email, role FROM "User";

All functions are at your disposal

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published