UVT-GDSC-NestJS-Workshop

Prerequisites

  1. Install NodeJs: https://nodejs.org/en/download/

Setup

  1. Install NestJs CLI: npm i -g @nestjs/cli
  2. Run nest new project-name to create a new NestJs project
  3. Change the directory to the new project and run npm run start:dev to start the NestJs server

Session 1

Hello World Module

  1. Create an endpoint that returns a string "Hello World!".

Math Module

  1. Create an endpoint that subtracts two numbers.
  2. Create an endpoint that sums two numbers.
  3. Create an endpoint that multiplies two numbers.
  4. Create an endpoint that divides two numbers.
  5. Create an endpoint that given an operation and a string of numbers separated by ,, returns the result of the operation applied to the numbers.

Movie Module

  1. Create an endpoint that returns a list of available movies (title and id).
  2. Add query params to the endpoint from point 1 to sort the movies by title ascending or descending.
  3. Create an endpoint that returns movie details given the movie id.

Random Module

  1. Create an endpoint that returns a random quote.
  2. Create an endpoint that returns a random dog photo.