An event-driven asynchronous Node.js Weather app, to explore Node.js' asynchronous non-blocking single-threaded event-loop. This is part of Andrew Mead's (mead.io) "The Complete Node.js Developer Course".
Return a weather forecast based on user's input location
- Uses mapbox.com for forward geocoding
- Uses darksky.net to return the weather forecast for a given town/place.
- Uses
ECMAScript6Object Property Shorthand and Destructuring
- Create a (free) account with mapbox.com and darksky.net and provide the keys/tokens through an environment variable
- Run
git update-index --assume-unchanged config/tokens.jsonto avoid commiting the tokens to a remote repo
Through the command line:
DARKSKY_TOKEN="your-darksky-token" MAPBOX_TOKEN="<your-mapbox-token>" node app.js "Lille"