January 2018
Beginner
658 pages
13h 10m
English
To fetch weather app code from the app.js file, we'll duplicate app.js, because we configure yargs in the original app.js file and we'll want to carry the code over to the new project. There's no need to rewrite it. In the weather directory, we'll duplicate app.js, giving it a new name, app-promise.js.
Inside app-promise.js, before we add anything, let's rip some stuff out. We'll be ripping out the geocode and weather variable declarations. We'll not be requiring any files:

Then I'll remove everything after our yargs configuration, which in this case is just our call to geocodeAddress. The resultant ...
Read now
Unlock full access