This is a final project from Udacity Front End Nanodegree Program. The project makes use of html, css, javascript, webpack, jest, node, and express.
The web application takes a date and city as an input, and displays the weather information and countdown of the days that are left until the travel.
- Need to dounload and install node.
All the dependencies are listed in the "package.json" file. How to install them can be found in the next section.
Step 1: Create .env file
First You need to create .env file inside the project root.
Inside you need to create the following:
USER_NAME=<user_name>
WEATHER_KEY=<api_key>
PIXABAY_KEY=<api_key>
The USER_NAME is from Geoname.
The WEATHER_KEY is from Weatherbit.
The PIXABAY_KEY is from Pixabay.
Step 2: Install Dependencies
In the terminal, cd into the project folder(.../travel-app):
$ npm install
Step 3: Start server
Open two terminal, in one:
$ npm run build-devThe above starts the dev server and opens up the browser on port 8080.
And in the other:
$ npm run build-prod
$ npm run startThe above starts the server on port 8081.
Test can be ran using the following command in the terminal in project root folder:
$ npm run testFeature implemented:
- Allow the user to remove the trip.
- When user clicks "Remove Trip" button, the trip information gets emptied.