Microservice to get the latest public GitHub repos from a user
I currently use this on my website.
It returns the latest repos along with some metadata. The result is cached for a day.
With vercel
git clone https://github.com/sindresorhus/gh-latest-repos.git
vercel gh-latest-repos --env GITHUB_TOKEN=xxx --env GITHUB_USERNAME=xxx --env ACCESS_ALLOW_ORIGIN=xxx --env MAX_REPOS=xxx
To deploy on your own hosting provider, check out 11e01ac, 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.MAX_REPOS
- The number of repos returned. Optional. Defaults to 6.