AbdelrahmanSadat / travolic

A small task for the travolic backend position (will be removed later)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travolic Task

AbdelrahmanSadat Maintainability

Try It!

The app is deployed to heroku at "https://travolic-task.herokuapp.com".

Head over to "https://travolic-task.herokuapp.com/hotels" and check the usage section for more details.

Install

Clone The Repo:

$ git clone https://github.com/AbdelrahmanSadat/travolic.git

Install Dependencies:

We prefer using Yarn over npm

$ yarn

Run

To run in development:

$ yarn run dev

To run in production:

$ yarn run start

The app runs on port 3000 by default

Test

To run all tests:

$ yarn run test

Usage

The app has one route called "/hotels". We can pass optional parameters as a query string to filter the results. These include:

name

String

city

String

lowestPrice

Numeric

highestPrice

Numeric

date_start

ISO8601 Date

date_end

ISO8601 Date

sortBy

One of "name" or "price"

Example

https://travolic-task.herokuapp.com/hotels?lowestPrice=800&date_end=2020-04-10T02:33:18.252Z

localhost:3000/hotels?city=cairo&highestPrice=1000&date_start=2020-04-09T02:33:18.252Z

About

A small task for the travolic backend position (will be removed later)


Languages

Language:JavaScript 100.0%