Giter Site home page Giter Site logo

muskanmahajan37 / weather-journal-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from payalbhandwalkar/weather-journal-app

0.0 0.0 0.0 30 KB

Weather Journal Web Application using Express.js

License: Apache License 2.0

JavaScript 49.77% HTML 20.91% CSS 29.32%

weather-journal-app's Introduction

Weather Journal App

Requirements

Project Environment Setup

  • Node and Express Environment:
    • Node and Express should be installed on the local machine. The project file server.js should require express(), and should create an instance of their app using express.
    • The Express app instance should be pointed to the project folder with .html, .css, and .js files.
  • Project Dependencies:
    • The ‘cors’ package should be installed in the project from the command line, required in the project file server.js, and the instance of the app should be setup to use cors().
    • The body-parser package should be installed and included in the project.
  • Local Server:
    • Local server should be running and producing feedback to the Command Line through a working callback function.
  • API Credentials:

APIs and Routes

  • APP API Endpoint:
    • There should be a JavaScript Object named projectData initiated in the file server.jsto act as the app API endpoint.
  • Integrating OpenWeatherMap API:
    • The personal API Key for OpenWeatherMap API is saved in a named const variable.
    • The API Key variable is passed as a parameter to fetch()
    • Data is successfully returned from the external API.
  • Return Endpoint Data:
    • There should be a GET route setup on the server side with the first argument as a string naming the route, and the second argument a callback function to return the JS object created at the top of server code.
  • Return Endpoint Data:
    • There should be an asynchronous function to fetch the data from the app endpoint
  • POST Route:
    • You should be able to add an entry to the project endpoint using a POST route setup on the server side and executed on the client side as an asynchronous function.
    • The client side function should take two arguments, the URL to make a POST to, and an object holding the data to POST.
    • The server side function should create a new entry in the apps endpoint (the named JS object) consisting of the data received from the client side POST

Dynamic UI

  • Naming HTML Inputs and Buttons For Interaction:
    • The input element with the placeholder property set to “enter zip code here” should have an id of zip.
    • The textarea included in project HTML should have an id of feelings.
    • The button included in project HTML should have an id of generate.
  • Assigning Element Properties Dynamically:
    • The div with the id, entryHolder should have three child divs with the ids:
      • date
      • temp
      • content
  • Event Listeners:
    • Adds an event listener to an existing HTML button from DOM using Vanilla JS.
    • In the file app.js, the element with the id of generate should have an addEventListener() method called on it, with click as the first parameter, and a named callback function as the second parameter.
  • Dynamically Update UI:
    • Sets the properties of existing HTML elements from the DOM using Vanilla JavaScript.
    • Included in the async function to retrieve that app’s data on the client side, existing DOM elements should have their innerHTML properties dynamically set according to data returned by the app route.

weather-journal-app's People

Contributors

prathmeshsadake avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.