Skip to content

aolamide/quizza-api

Repository files navigation

Quizza API

API for quizza.live.

Technologies used : NestJS, TypeORM, MySQL, Docker.

Prerequisites

  • Docker and Docker Compose
  • Node.js
  • Yarn package manager

Environment Setup

Create a .env file in the root directory based on this .env.example file.

Running with Docker Compose

Development Mode

  1. Start the application:
docker-compose up -d
  1. Watch logs:
docker-compose logs -f app
  1. Stop the application:
docker-compose down

Database Migrations

Generate a Migration

# From your local machine
yarn migration:generate ./src/db/migrations/MigrationName

# From within the container
docker-compose exec app yarn migration:generate ./src/db/migrations/MigrationName

Create an Empty Migration

yarn migration:create ./src/db/migrations/MigrationName

Run Migrations

# From your local machine
yarn migration:run

# From within the container
docker-compose exec app yarn migration:run

Revert the Latest Migration

yarn migration:revert

Development Without Docker

  1. Install dependencies:
yarn
  1. Start the development server:
yarn start:dev

Available Scripts

  • yarn build - Build the application
  • yarn start - Start the application
  • yarn start:dev - Start with hot-reload
  • yarn lint - Lint the codebase
  • yarn test - Run tests
  • yarn test:e2e - Run end-to-end tests

About

API for Quizza. Tech: NestJS, TypeScript, MySQL, TypeORM, Docker, Docker Compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •