This repository contains my code for the third project in Udacity's Front End Web Developer Nanodegree Program. This project creates a basic weather journal application. This project uses server-side and client-side code to collect, store, and retrieve weather data and user input. Also, this project uses Promises in JavaScript to perform the following actions:
- Get weather data about specific ZIP codes using the OpenWeatherMap API.
- Store weather data with user input on the server endpoint.
- Get all data from the server endpoint, and then dynamically update the User Interface (UI) to display the data.
Along with this documentation, the root directory of this project contains the following important files:
- server.js: Server code for the project
- package.json: Used to manage Node.js dependecies and scripts
- package-lock.json: Used to manage changes to the package.json file or to other Node.js dependencies
The "website" folder contains the HTML files, CSS files, application code (client-side code), and images that are used to build and update the webpage.
This project requires Node.js v14.15.5 or higher.
Note that in order to gather weather data, this project requires an API key for the OpenWeatherMap API.
This key needs to be added to the apiKey
variable in the app.js file of this project.
For example, if your API key is 12345, you set the apiKey
variable as const apiKey = '&appid=12345'
.
You can sign up for a free API key at the OpenWeatherMap API website.
If Node.js is not installed, go to Node.js, download the
appropriate Node.js installation file for your operating system, and install Node.js using the default
installation settings. If you need to update your computer's version of Node.js, see this article for advice.
Once Node.js is installed, run the command npm install
on your terminal, which will install all the modules
listed as dependencies in the package.json file.
To execute the server code for this project, run the command node server.js
on your terminal.
Then, open your browser and enter the URL, http://localhost:8000, to open the project webpage.
The current code has no existing technical issues or bugs.
This project is currently not under any license.
Other than the .gitignore file, all files in this project were developed from scratch. However, the webpage's structure is based off of the basic webpage structure presented by Udacity's starter code for the project.