NathanKleekamp / express-api-proxy-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Express API Proxy Example

Use Express to proxy requests to a 3rd party API. Useful for making CORS and authenticated requests.

To use this for making authenticated requests to Github, you'll need to get a personal API token from Github, and save it in a .env:

TOKEN='<your token here>'
$ npm install && npm start

Then visit localhost:3000.

To see the proxied GET: /users/:username response from Github, visit http://localhost:3000/api/users/octocat

About


Languages

Language:JavaScript 78.8%Language:HTML 15.3%Language:CSS 5.9%