https://github.com/madhur-taneja/weather-journal-app
A web app which provides current weather conditions of a location by zip code through an API
https://github.com/madhur-taneja/weather-journal-app
css html javascript nodejs weather-forecast-api weather-journal weather-journal-app
Last synced: 15 days ago
JSON representation
A web app which provides current weather conditions of a location by zip code through an API
- Host: GitHub
- URL: https://github.com/madhur-taneja/weather-journal-app
- Owner: madhur-taneja
- Created: 2020-05-29T17:36:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T22:33:35.000Z (almost 3 years ago)
- Last Synced: 2025-06-03T07:36:06.222Z (5 months ago)
- Topics: css, html, javascript, nodejs, weather-forecast-api, weather-journal, weather-journal-app
- Language: JavaScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weather Journal App
An asynchronous web app that uses Web API and user data to dynamically update the UI.
## Table of Contents
- [Getting Started](#getting-started)
- [Tools Required](#tools-required)
- [Installation](#installation)
- [Instructions](#instructions)
- [Extras](#extras)
- [Development](#development)
- [Running the App](#running-the-app)
- [References](#references)## Getting Started
The starter code can be found in [this](https://github.com/udacity/fend/tree/refresh-2019) repo provided by Udacity.
The project will be evaluated by a Udacity code reviewer according to the Weather Journal App project [rubric](https://review.udacity.com/#!/rubrics/2655/view).
### Tools Required
You would require the following tools to develop and run the project:* [node.js](https://nodejs.org/en/)
* [npm](https://www.npmjs.com/)
* A text-editor of your choice.### Installation
Start by setting up the project environment. `cd` into the project's root folder and run the following command to install the packages mentioned in `package.json`:
```
npm install
```### Instructions
This project required modifying the `server.js` file and the `website/app.js` file. `index.html` was used for element references, and once finished with the project steps, `style.css` was used to style the application to customized perfection.### Extras
If interested in testing the code, `tests.js` can be used as a template for writing and running some basic tests for your code.## Development
* Add a `GET` route that returns the projectData object in your server code Then, add a `POST` route that adds incoming data to projectData
* Acquire API credentials from OpenWeatherMap [website](https://openweathermap.org/api)
* After the successful retrieval of the weather data, chain another Promise that makes a POST request to add the API data, as well as data entered by the user, to your app.
* Finally, chain another Promise that updates the UI dynamically
For details now how these functionalities have been implemented, refer the source code.
## Running the App
* Before starting the server, go to the `website/app.js` folder. On line 3,
```
const apiKey = '&APPID=***'
```
replace the `***` with the unique apiKey that was generate for you on OpenWeatherMap.* Open terminal in the root directory and run the following command:
```
npm run start
```
* The server will start on `http://localhost:3000/` in your browser.## References
* API [docs](https://openweathermap.org/current)
* [Stack Overflow](https://stackoverflow.com/) for resolveing errors