- Python >= 2.7 (comes with node.js)
- Visual Studio 2017 Build Tools (comes with node.js)
- node.js >= 13.7.0
- Make sure to check
Automatically install the necessary tools
since node-sass and xml2json packages require Visual Studio 2017 Build Tools and Python
- Make sure to check
- Python >= 2.7
- Debian repository:
sudo apt install nodejs build-essentials
- AUR repository:
sudo pacman -S nodejs base-devel
After cloning the repository, run npm install
while in the root directory of the project. npm will automatically attempt to download and install all the required dependencies
Read here if you run into problems during this process.
npm run start
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
NOTE: The application will display a continuous loading animation if the API web service is not running
npm run api
Runs the web service on port :5000 which contains the API endpoints and the server logic
-
/api/getMorningFlights (gets all the morning flights betweeen 6 and 12 AM)
-
/api/getPercentageOfFlights (gets the percentage of the flights going into a specific country)
country
param - specify which country to look up for
-
/api/getMostPopularDestinations (gets the most popular destinations up to n elements)
limit
param - specify how many destinations to fit in the response (defaults to 10)
-
/api/getAvgJourneyTime (gets the average journey time for both in and out flights from a departure point to a destination point)
departure
param - specify the departure point as IATA codedestination
param - specify the destination point as IATA code
This one was a bit tricky due to the timezone discrepancies since I did not know if I should take them into consideration. I ended up taking them and the journey times are more or less similar to Google flights
-
/api/getNumberOfFlightsPerDay (gets the number of flights per day in a specific month and year)
year
param - specify which year to look up intomonth
param - specify which month to look up into
Due to the nature of data having only information about the flights in January 2018, the API can only support January 2018
- Front-End
- Back-end
- Both ends
If you run Windows and the packages fail to build (node-expat and/or node-sass) try to re-install node.js and make sure the necessary tools are installed without errors (Python and Visual Studio 2017 Build Tools). There are also some fixes documented here given the problem still persists.
Linux systems should not have any problems if you followed the instructions