Skip to content

Weather Journal app with asynchronous JavaScript that creates a weather record for user based on their input and data from OpenWeatherMap API.

Notifications You must be signed in to change notification settings

alexandrabaturina/weather-journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FEND Project #3: Weather Journal

Overview

Weather Journal is the third project of Udacity Front End Web Developer nanodegree program. It requires to build a single-page JavaScript app which creates a weather record for user based on their input and data from OpenWeatherMap API.

The goal of the project is to practice with:

  • setting up Node environment with Express and project dependencies
  • setting up a server with GET and POST routes
  • using fetch API with OpenWeatherMap API credentials
  • accessing a GET route on the server side from a function called on the client side
  • promise chaining
  • dynamically updating properties of HTML elements

Features

  • Local server (server.js) is running on port 3030.

  • Data is retrieved from external OpenWeatherMap API in JSON format.

    • API calls use zip code entered by the user. Search works only for US zips.
  • The following values are updated dynamically:

    • date
    • temperature
    • user input

    image

Dependencies

Cool tech stuff used in this project:

Getting Started

Prerequisites

  1. Download Node.js.
  2. Install the following packages using npm.
$ npm install express
$ npm install cors
$ npm install body-parser

Running Locally

To run Weather Journal locally:

  1. Clone this repository.
  2. cd into project directory.
  3. Start the local server from command line.
$ node server.js
  1. Open http://localhost:3030 in your browser.

Using Another API Key

To use your own OpenWeatherMap API key,

  1. Create an account on https://openweathermap.org/api.
  2. In app.js, save your key in apiKey constant.

Authors

Alexandra Baturina

About

Weather Journal app with asynchronous JavaScript that creates a weather record for user based on their input and data from OpenWeatherMap API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published