Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment, You will create a NodeJS application which takes a city name as an input in its pug template. using openweathermap API, you

For this assignment, You will create a NodeJS application which takes a city name as an input in its pug template. using openweathermap API, you should get the weather of that particular city and displays that information to a new pug template. You should also store the results in a file in your directory. Following are the detailed requirements.

Your application should start with a pug template (similar to HTML page) which has a form with an input field and label to accept the city name and a button on clicking which we can send a GET request to the server.

Your server code (Back-end) should be able to take this city name, make an API call to the openweathermap API.

You should be able successfully to establish the API call and retrieve data from it.

You should also be able to display this data in a new pug template.

This same pug template will also have a form in which we should be able to enter the data you that we received from openweathermap.

On entering and submitting that data, You should be able to make a POST request to your back-end.

Your back-end code should write those values to a file in your local directory using async and fs.

Openweathermap API documentation: https://openweathermap.org/api

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions

Question

2. How were various roles filled?

Answered: 1 week ago