Microservice to get the latest public GitHub repos from a user
I currently use this on my website.
It returns the 6 latest repos and it's cached for a day.
With now
or
$ now sindresorhus/gh-latest-repos -e NODE_ENV=production -e GITHUB_TOKEN=xxx -e GITHUB_USERNAME=xxx -e ACCESS_ALLOW_ORIGIN=xxx
Deploy to your hosting provider, set the below environment variables, and start it with npm start
.
Define the following environment variables:
GITHUB_TOKEN
- Personal access token.GITHUB_USERNAME
- The username you like to get repos from.ACCESS_ALLOW_ORIGIN
- The URL of your website or*
if you want to allow any origin (not recommended), for theAccess-Control-Allow-Origin
header.
MIT © Sindre Sorhus