The project creates a travel app that obtains a desired trip location & departure/return dates from the user, and displays weather and an image of the location using information obtained from 3 external APIs. Uses Node and Express to run on a local server.
If you don't have Node already installed on your machine, you can download it here. You will also need API credentials for the following:
- Geonames - Register and keep your username.
- Weatherbit - API key
- Pixabay - API key
After you get your user name & api keys, you can create a .env file in the root of your project and add these credentials.
API_KEY = ********************
For more information about the dotenv module visit this link.
If Node is installed, then you can use the Node Package Manager to install the packages needed to run this program. Use this command in the terminal:
npm install
When those packages have installed, make builds and start the server with the following commands. For developer mode, which runs webpack-dev-server:
npm run build-dev
And for production mode, which uses the express server:
npm run build-prod
npm start
Enter a location, e.g. London. Then a desired departure and return date. If you have entered valid information, you will receive:
- infromation about the location (country & population)
- the dates you inserted
- calculation of your trip duration and countdown to your departure
- a photo of the location
- a weather forecast for each day of your trip
- the ability to print your trip
The code was written by EvelinaIo, as part of Udacity's Front-End Development Nanodegree course, Capstone project submission.