January 2018
Beginner
658 pages
13h 10m
English
Inside our app-promise file, we can get started by loading in axios at the top. We'll make a constant called axios, setting it equal to require('axios'), as shown here:
const yargs = require('yargs');const axios = require('axios');
Now that we have this in place, we can actually start making the calls in the code. This will involve us pulling out some of the functionality from the geocode and weather files. So we'll open up the geocode.js and weather.js files. Because we will be pulling some of the code from these files, things such as the URL and some of the error handling techniques. Although we'll talk about the differences as they come up.
The first thing we need to do is to encode the address and ...