Final project of Udacity's Frontend Developer Nanodegree.
This capstone project is a travel app that lets users input their trip location, departure and return dates and displays weather info and an image of the location using the Geonames, Weatherbit and Pixabay APIs.
Users will see how many days they have left until departure, and get the weather forecast if their trip is within the next 16 days. Otherwise, they'll see the current weather at their destination. The app also shows the total duration of their trip.
Fork the project Github repo, and then clone or download the zip file locally. Once you have the project locally, navigate to the project directory to install all dependencies.
cd <project directory>
npm install
This project uses the following APIs:
When you sign up, you'll be able to get your personal API keys for Weatherbit and Pixabay. For Geonames you'll just need to get your username once your account is activated.
At the root of the project, create a new file named .env
. Inside the file, add the following lines, replacing the stars with your personal API keys and the Geonames username.
GEOCODES_NAME=**************************
WEATHERBIT_KEY=**************************
PIXABAY_KEY=**************************
After you've created your local copy and added your API key to the .env
file, you're ready to start using it!
Use the following command to start the developer server. This should open a new window in your browser with the app running on localhost:8000
npm run build-dev
To run the production server (with express), run these commands
npm run build-prod
npm run start
This will create a dist
folder with the built code. The production server runs on localhost:8082
Tests for this app have been implemented using Jest. To run tests, use this command:
npm run test
- Clarke Jacobse
- Background by Webgradients
- Used this post on StackOverflow to handle the form submit