Skip to content

codewithmo/restapi-nest

Repository files navigation

Nest Logo

A REST API application using Node.js framework for building efficient and scalable server-side applications and Postgres for persistence.

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

Features

  1. API to fetch the list of restaurants in India using Zomato APIs (Get you own access key from Zomota's website).

    (method: Get; route: localhost:3000/restaurants)

  2. An api via which a user can post a rating on a restaurant, with his name and mailId. No login system. The API body params should carry name, email id, rating & restaurant id.

    (method: Post; route: localhost:3000/restaurants/rating)

  3. Api to fetch ratings of restaurants, passing restaurant Id as path param.

    (method: Get; path_param:restaurant_id; route: localhost:3000/restaurants/rating/{res_id})

  4. Api to fetch ratings of all restaurants.

    (method: Get; route: localhost:3000/restaurants/ratings)

Post json format example

{
  "name": "user",              #this value can't be empty and should be string;
  "emailid": "user@email.com", #this value should be in proper mail format;
  "restaurantid": "12344312",  #this should be number string;
  "rating": 4.5                #this value should be number with range of 0-5;
}

Swagger

localhost:3000/api

Stay in touch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published