Skip to content

Instantly share code, notes, and snippets.

@nurpax
Created July 26, 2019 20:49
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 nurpax/d11aace5c271055940aea44eea925b6b to your computer and use it in GitHub Desktop.
Save nurpax/d11aace5c271055940aea44eea925b6b to your computer and use it in GitHub Desktop.
const urlParams = new URLSearchParams(window.location.search);
const myParam = urlParams.get('gist_id');
console.log(myParam);
console.log(process.env.PUBLIC_URL);
fetch('https://api.github.com/gists/5cbb8438e12add2d8cd1723c7459e0ec')
.then(resp => resp.json())
.then(json => console.log(json));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment