Skip to content

johnb0/nestjs-rest-api

 
 

Repository files navigation

nestjs-rest-api

NestJS Rest-Api powered by AWS DynamoDB

Dynamodb Local Start

  1. Install Docker (and docker-compose if you use Linux);
  2. Open a console, navigate to the root of this project (using cd) and run docker-compose up (sudo docker-compose up for Linux), docker-compose.yml must be in the project. If you want to stop the db, use docker-compose down (sudo docker-compose down for Linux);
  3. If you see such statements in the console, db is up. If you faced some db local setting up issues, check this resource
    img.png
  4. Install AWS NoSQL Workbench for comfortable data visualization.

App Start

  1. Create .env file in the root and copy & paste mocked data from .sample-env
  2. Edit .env file by writing correct credentials and other connection data
  3. Run yarn start:dev (npm run start:dev) for development or yarn start (npm start) to up the server
  4. Connect to swagger using http://localhost:3000/docs url. Provide simple auth typing secret in x-auth-key input
    img_2.png

Table schema at this project:

img.png

userId is a hash key and relationKey is a range key

There is one entity called User that has nesting objects called Carts, in other words, One User to Many Carts (One-To-Many)

About

NestJS Product API template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.4%
  • Shell 6.4%
  • JavaScript 6.3%
  • Dockerfile 5.9%