Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/gh-latest-repos
Microservice to get the latest public GitHub repos from a user
https://github.com/sindresorhus/gh-latest-repos
api-server github graphql javascript microservice nodejs repository
Last synced: about 22 hours ago
JSON representation
Microservice to get the latest public GitHub repos from a user
- Host: GitHub
- URL: https://github.com/sindresorhus/gh-latest-repos
- Owner: sindresorhus
- License: mit
- Created: 2017-09-21T19:09:46.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T19:04:10.000Z (10 months ago)
- Last Synced: 2025-02-01T17:28:15.190Z (9 days ago)
- Topics: api-server, github, graphql, javascript, microservice, nodejs, repository
- Language: JavaScript
- Homepage: gh-latest-repos-sindresorhus.vercel.app
- Size: 325 KB
- Stars: 150
- Watchers: 6
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-micro - gh-latest-repos - Get the latest public GitHub repos from a user (Built with Micro / Utilities)
- awesome-list-microservice - gh-latest-repos
README
# gh-latest-repos
> Microservice to get the latest public GitHub repos from a user
I currently use this on [my website](https://sindresorhus.com/#projects).
It returns the latest repos along with some metadata. The result is cached for a day.
[Example response](example-response.json)
## Usage
### With [`vercel`](https://vercel.com)
```sh
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
```### Manual
To deploy on your own hosting provider, check out [11e01ac](https://github.com/sindresorhus/gh-latest-repos/commit/11e01acb0d0fd40d69c03155e9862b4cdc71b6f2), 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=gh-latest-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 6.