Skip to content

Instantly share code, notes, and snippets.

@jeromelachaud
Created May 12, 2017 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeromelachaud/8c9eba3c9176b2294fe33dfd8ebd7e7e to your computer and use it in GitHub Desktop.
Save jeromelachaud/8c9eba3c9176b2294fe33dfd8ebd7e7e to your computer and use it in GitHub Desktop.
const fetch = require('node-fetch');
function showGitHubUser(handle) {
const url = `https://api.github.com/users/${handle}`;
fetch(url)
.then(response => response.json())
.then(user => {
console.log(user.name);
console.log(user.location);
});
}
showGitHubUser('jeromelachaud');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment