DEV Community

Cover image for How to Make a Weather App using JavaScript

How to Make a Weather App using JavaScript

Shantanu Jana on December 03, 2021

In this article you will learn how to create weather app using JavaScript. This JavaScript Weather app will help you to know about the weather of a...
Collapse
 
orsifrancesco profile image
Francesco Orsi

I really like this project :) but I would never share my API KEY..

one of the simplest way to avoid it.. should be creating a server side page (nodejs.. PHP..) with a CURL to openweather.org + API blocking all the requests other than your domain

Collapse
 
shantanu_jana profile image
Shantanu Jana

Yes you are right. From now on I will try not to provide API KEY.
Thanks for liking the project 😍

Collapse
 
imagineeeinc profile image
Imagineee

can I ask why you are revealing your api key for open weather, on the internet publicly, people can use it and even exploit it, and if you are using the free plan you get 1,000,000 api calls a month, so you can run out of the number of calls quickly if people can accses it for free.

Collapse
 
shantanu_jana profile image
Shantanu Jana

Thanks for letting me know. But if I don't share how others will use this project.

I don't think there is any reason to worry because I am using premium plane for this. 😊

Collapse
 
imagineeeinc profile image
Imagineee

oh, I didn't know, but still I feel like its a bad practise overall, though you are helping beginners, you can teach them instead how to obtain a api key

Collapse
 
cheribc profile image
Heather B Cooper

Thank you for the step by step instructions and examples. It's very helpful to me as a beginner to organize my thoughts.

Collapse
 
shantanu_jana profile image
Shantanu Jana

welcome

Collapse
 
sehgalspandan profile image
Spandan Sehgal

Wow it's design is so fluent I will also try to make it .
And the comment by @imagineeeinc is also correct .
Keep it up
Good luck bro

Collapse
 
shantanu_jana profile image
Shantanu Jana

Thank you

Collapse
 
pritishraj04 profile image
Pritish Raj • Edited

Correct me if i am wrong. Wouldn't the description.innerHTML part in JavaScript code throw an error? Since "description" is not defined rather descrip is the var name used in the top.

Collapse
 
fz_vega profile image
Fernando • Edited

I like this project. I will try use async/await + try/catch with fetch.