https://github.com/abranhe/popular-repos
Get the most popular public repositories from a user ✨
https://github.com/abranhe/popular-repos
popular repos
Last synced: about 1 month ago
JSON representation
Get the most popular public repositories from a user ✨
- Host: GitHub
- URL: https://github.com/abranhe/popular-repos
- Owner: abranhe
- License: mit
- Created: 2018-09-26T17:09:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-27T14:58:03.000Z (almost 8 years ago)
- Last Synced: 2025-02-28T10:09:33.130Z (over 1 year ago)
- Topics: popular, repos
- Language: JavaScript
- Homepage: https://projects.abranhe.com/popular-repos
- Size: 8.79 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
[](https://deploy.now.sh/?repo=https://github.com/abranhe/popular-repos&env=GITHUB_TOKEN&env=GITHUB_USERNAME&env=ACCESS_ALLOW_ORIGIN&env=MAX_REPOS&env=CACHE_MAX_AGE)
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.](https://github.com/settings/tokens/new?description=popular-repos)
- `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](https://github.com/sindresorhus/gh-latest-repos)👏
- [gh-latest-repos](https://github.com/sindresorhus/gh-latest-repos): Microservice to get the latest public GitHub repos from a user.
# Team
|[](https://19cah.com)|
| :-: |
| [Carlos Abraham](https://github.com/abranhe) |
# License
[MIT](https://github.com/abranhe/popular-repos/blob/master/LICENSE) License © [Carlos Abraham](https://github.com/abranhe)