Skip to content

danny-oli/Node-Typescript-RestAPI

Repository files navigation

Access all the routes by clicking the button below, or at [https://tui-backend.herokuapp.com/docs]!

Run in Insomnia

NodeJs - Typescript - Mongodb - RestAPI


Welcome to my Node.Js API

In this API you are able to retrieve Hotels using the Amadeus API There is also a User's CRUD.


Features

API Setup

  • Restful API using json;
  • Heroku
  • Node.Js;
  • Express.Js;
  • MongoDb;
  • Nodemoon;
  • Mongoose;
  • Jest;
  • Swagger;
  • Insomnia;
  • Dotenv;
  • Uuid;
  • Jwt;

Functional Requirements

  • Locked Routes using user integrationKey (received when creating a new User);
  • Complete User CRUD;
  • Able to find Hotels using a city code e.g. LON from Londom;
  • Get all previous searches from the database;

Not Functional Requirements

  • Use Amadeus as Hotels provider;
  • Use MongoDB as a NoSql database;
  • Jest testing;
  • Swagger for documentation;
  • Restful API;
  • Environment variables;

Documentation


🚀 Start the project!

  • Start by cloning the repo.
  • Install project dependencies:
yarn install
  • With everything setup, duplicate the .env.example file to a new file called .env
  • Run application testes with the command:
yarn test
  • Run application with the command:
yarn dev
  • At the end, you can confirm that all routes are working fine.

🚀 Insomnia testing!

Routes info! Deploy url: [https://tui-backend.herokuapp.com]

ROUTES HTTP DESCRIPTION
/user/create POST Create User
/user/login POST Login to get Token
/user/find-by-email/:email GET Find by Email
/user/find-by-id/:id GET Find by Identity
/user/find-all/ GET Find All
/user/update/:id PUT Update User
/user/delete/:id DELETE Delete User
/hotel/find/:cityCode GET Find Hotels by CityCode
/hotel/search-history/ GET Get Hotel Search History

Thanks for giving me this chance. I hope you like this API code sample. I am available if you have any questions about the project.


https://www.github.com/danny-oli

About

A Rest API made using Node.JS, Express.JS, MongoDb, Mongoose, Jest, Swagger and a few other packacges

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages