Skip to content

Instantly share code, notes, and snippets.

@bmorelli25
Last active April 24, 2018 19:17
Show Gist options
  • Save bmorelli25/cefc87d069721517c8ebcb93b5997a22 to your computer and use it in GitHub Desktop.
Save bmorelli25/cefc87d069721517c8ebcb93b5997a22 to your computer and use it in GitHub Desktop.
Node.js Weather App - part 1
let request = require('request');
let apiKey = '*****************************';
let city = 'portland';
let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}`
request(url, function (err, response, body) {
if(err){
console.log('error:', error);
} else {
console.log('body:', body);
}
});
@ManojKumarTiwari
Copy link

I saved the file in UTF-8 format and it worked!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment