An app that will give you weather report of your location.
This application uses the Mapbox geolocation API to determine the precise lattitude and longitude of a given location.
- Register for a Mapbox account
- Navigate to the Tokens dashboard and create a new public token.
The latitude and longitute are fed into the Dark Sky weather API, which retrieves an accurate forecast for the selected location.
- Sign up for the Dark Sky API
- After signing in, you will get a secret key
Both Mapbox and Dark Sky are paid services that allow for up to 1000 calls a day for free. If you wish to host this application publicly, you may need to upgrade your API access.
-
Create a
secret.js
file in root dir -
Add your API key from Dark Sky and LocationIQ.
let apiKey = {
geocodingApi: YOUR API KEY,
darkskyApi: YOUR API KEY,
};
module.exports = apiKey
- run
npm install
in the root dir - run
npm start
in terminal to start the server - point your browser to
localhost:3000
(default) - Enjoy the project
Paste your keys!
- Run
npm install
in the root dir. - Run
npm start
in terminal. - Enjoy the project.
View our Contributing Docs for information regarding contributing to this project.