Skip to content
Get the most popular public repositories from a user
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
responses
.editorconfig
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json
test.js

README.md




popular-repos: Get the most popular public repositories from a user.

Overview

It returns the most popular repositories (sorted by startgazers) of a user along with some metadata. The result is cached for a day.

Usage

Deploy to now

or

$ now abranhe/popular-repos -e NODE_ENV=production -e GITHUB_TOKEN=xxx -e GITHUB_USERNAME=xxx -e ACCESS_ALLOW_ORIGIN=xxx -e MAX_REPOS=xxx -e CACHE_MAX_AGE=xxx

Deploy to your hosting provider, set the below environment variables, and start it with npm start.

Environment variables

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 the Access-Control-Allow-Origin header.
  • MAX_REPOS - The number of repos returned. Optional. Defaults to 8.
  • CACHE_MAX_AGE - The maximum age for client cache-control in seconds. Optional. Defaults to 300 (5 minutes).

Related

it wouldn't be possible without gh-latest-repos👏

  • gh-latest-repos: Microservice to get the latest public GitHub repos from a user.

Team

Carlos Abraham Logo
Carlos Abraham

License

MIT License © Carlos Abraham

You can’t perform that action at this time.