Skip to content

Commit 331975d

Browse files
committed
add README.md
1 parent 6101f4a commit 331975d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
# Local Weather Service
1+
# Weather Service
2+
3+
Ever wonder why your phone shows weather data of your immediate vincinity on your travel? This project demnonstrates the use of Navigator.geolocation API that is part of NodeJS to pin point your immediate location. The geolocation method gets current position in longitude and latitude. The weather app uses these values to call to a weather service API for weather data.
24

35
## The Value of Weather Information
46
Weather information is powerful knowledge used in forcasting the production of certain operation to help determining the economic bottom line. There are countless human endearvours affecting by the weather factors. Rain is good for growers, fore warning is valuable in extreme weather, while sunny sky, windy days could be good for energy production. For examples, solar power production needs to know the number of hours of sunlight specific to geographical location. The travel and hospitality industry is most affected by dynamic weather patterns. From Agriculture to space faring, weather plays the key role in the decision making process.
57

6-
This project demnonstrates how you can use the geolocation function to get current position in longitude and latitude. Then, to get pin point weather data, you will construct an API query for weather statistics using the lng-lat value.
8+
There are weather detection stations situated in and around you. The inner working of making data available is not of interest to the populous but it is vital to a functioning society. Although, the National Weather service is a government agency whose diseminate data free of charge. Weather data has been monetized by repackaging in ways the population can consume. Local TV news reserve a segment devoted to weather ubiqutously. Weather data is available on your finger tips. It all factored into a transferable cost by some service providers you're currently paying.
79

810
<br />
911

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ app.post('/', (req, res) => {
2727
let city = req.body.locale;
2828
let url = process.env.WEATHER_VISUALCROSSING_API_BASE_URI;
2929

30-
/* https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Fremont%2C%20CA?unitGroup=us&contentType=json&key=E5PZ48U2C8EB6692GBD39U9LC */
30+
/* https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Fremont%2C%20CA?unitGroup=us&contentType=json&key=apiKey */
3131
let uriStr = `${url}${city}?unitGroup=us&contentType=json&key=${apiKey}`;
3232
console.log(uriStr);
3333
request(uriStr, async function (err, response, body) {
@@ -62,6 +62,6 @@ let port = process.env.PORT || 3210;
6262

6363
// creating a server that is listening on ${port} for connections.
6464
app.listen(port, () => {
65-
console.log(`Staging app is listening on port ${port}`);
65+
console.log(`StagingWeather report app is listening on port ${port}`);
6666
});
6767

0 commit comments

Comments
 (0)