Skip to content

Nest.js backend for Quiz Platform. Features include TypeORM for database, Swagger for API documentation, JWT for secure authentication, Redis for caching, Cron for scheduled tasks, PostgreSQL for robust data storage. Deployed on Docker and AWS

Notifications You must be signed in to change notification settings

Halif4ik/TypeOrm_NodeJs

Repository files navigation

Tasks Back End 6.0

Description:

First of all we created Get route with simple response. You can check on this endpoint- http://localhost:3008/. Tou need create .env file and add into it contein with vars as in sample file. Start the application.

yarn install

nest start --watch

If you would like start this app in Docker make next steps:

docker build -t health-check-img . 

docker run -p 3000:3008 --name healthCheckContainer --rm health-check-img
 

For stops application execute next command(application will be stoped and container will be removed)

docker stop healthCheckContainer

For run application in Docker Compose with database execute next command:

docker compose up

For migration i added dotenv packedje to typeorm.config.ts For create empty migration for handler contains execute next command:

typeorm migration:create ./src/migrations/init

Run this command you can see a new file generated in the "migrations" directory named {TIMESTAMP}-monday.ts and we can run it, and it will create a new table in our database.

npm run migration:generate -- src/migrations/monday

yarn run migration:run

yarn run migration:revert

Added CRUD functionality for User handler. Created User api:

http://localhost:3008/user
body: {
    "firstName":"Apple",
     "email":"Apple@mail.ua",
      "password":"1234"
}

Get all users with pagination:

http://localhost:3008/user?page=1&revert=false

About

Nest.js backend for Quiz Platform. Features include TypeORM for database, Swagger for API documentation, JWT for secure authentication, Redis for caching, Cron for scheduled tasks, PostgreSQL for robust data storage. Deployed on Docker and AWS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •