1
0
This commit is contained in:
Jason Williams 2019-08-25 15:31:41 -06:00
parent 1d6ada3e91
commit 38e23cf767

View File

@ -1,12 +1,23 @@
const geocode = require('./utils/geocode') const geocode = require('./utils/geocode')
const forecast = require('./utils/forecast') const forecast = require('./utils/forecast')
geocode('Boston', (error, data) => { const address = process.argv[2]
console.log('Error', error)
console.log('Data', data)
})
forecast(-75.7088, 44.1545, (error, data) => { if (!address) {
console.log('Error', error) console.log('Please provide an address')
console.log('Data', data) } else {
}) geocode(address, (error, data) => {
if (error) {
return console.log(error)
}
forecast(data.latitude, data.longitude, (error, forecastData) => {
if (error) {
return console.log(error)
}
console.log(data.location)
console.log(forecastData)
})
})
}