1
0
CompleteNodeJS/web-server/public/js/app.js

13 lines
289 B
JavaScript
Raw Normal View History

console.log('Client side javascript file is loaded!')
fetch('/weather?address=boston').then((response) => {
response.json().then((data) => {
if (data.error) {
console.log(data.error)
} else {
console.log(data.location)
console.log(data.forecast)
}
})
})