Project Weather Journal App
3rd Project for UDACITY NanoDegree
Overview
This project requires to create an asynchronous web app that uses Web API and user data to dynamically update the UI. This will require modifying the server.js file and the website/app.js file.
Coding Steps
- Setup Node environment with Express
- Add required dependencies
- Setup server with GET and POST routes
- Create developer credentials for Web API
- Use the Fetch API with my credentials and user input to get dynamic data into my app routes
- Access a GET route on the server side, from a function called on the client side
- Chain Promises together
- Access HTML elements with JavaScript and set their properties dynamically
- Fix errors
- Clean up code
File:
Website Folder img Folder app.js index.html style.css
server.js package-lock.json package.json
In Terminal Install Node and packages: npm install express npm install cors npm install body-parser Must have Key from OpenWeatherAPI for the project to run In APP.js file add the API_KEY.
RunningProject
In the terminal run the server Node Server.js Open the HTML file in the browser
Packages used in the project: express cors body-parser