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

Patr1k10/Med_NodeJS_BacK

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Copy the .env.sample file and fill in .env

Docker

  1. Build Docker Image: Build a Docker image of your application using the following command:
docker buildx build -t your-app-name .
  1. Run Docker Container: Run a Docker container using the built image with the following command:
docker run -d -p 3000:3000 your-app-name

Replace your-app-name with the actual name of your Docker image.

  1. Access the Application: The application will be accessible at http://localhost:3000.

  2. Create docker-compose.yml: Define services, ports, and dependencies in this file.

  3. Start Application Run in the directory with docker-compose.yml.

docker-compose up
  1. Use a .env.sample file with sample configuration values for your resources (such as database credentials). Developers can copy this file to .env and customize the values according to their

TypeOrm

Migration Creation:

To create a migration, use the following command:

npx typeorm migration:create src/migrations/your-migration-name   

This creates a new migration file in the migrations folder. The file contains up function (instructions for updating the database) and down function (instructions for rolling back changes).

Editing a Migration:

In the migration file, define changes in the up function. For instance, if you're adding a new field, creating a table, or removing an existing field, describe it in the up function. In the down function, specify actions for rollback if needed.

Applying a Migration:

After editing the migration, apply it to the database with the command:

npx typeorm migration:run

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages