https://github.com/triggerdotdev/github-stars-demo
An app that fetches the star count for a given Github repo using API Hero
https://github.com/triggerdotdev/github-stars-demo
Last synced: 9 months ago
JSON representation
An app that fetches the star count for a given Github repo using API Hero
- Host: GitHub
- URL: https://github.com/triggerdotdev/github-stars-demo
- Owner: triggerdotdev
- Created: 2022-09-01T10:59:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-18T12:52:39.000Z (about 3 years ago)
- Last Synced: 2025-03-02T00:08:39.303Z (10 months ago)
- Language: JavaScript
- Homepage: https://look-to-the-stars-6eqm0q07h-apihero.vercel.app/
- Size: 9.43 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Hero - Next.js GitHub Demo
This repository contains a Next.js demo app that interacts with the [GitHub API](https://docs.github.com/en/rest) using [API Hero](https://apihero.run), to fetch the current star count of a repository.
## Getting started
> You'll need an API Hero account to run this demo. Signup for the waitlist [here](https://apihero.run/privateBetaSignup)
Clone the repository and install the dependencies:
```bash
git clone https://github.com/apihero-run/github-stars-demo.git
cd github-stars-demo
npm install
```
Invoke the API Hero CLI to add the GitHub integration to your API Hero account:
```
npx apihero@latest add github
```
After following the prompts, you should be shown a `projectKey`. Edit the `ApiHeroProvider` component in [pages/index.tsx](/pages/index.tsx) and add the `projectKey` prop:
```tsx
export default function App() {
return (
);
}
```
Now you are ready to run the app with `npm run dev` and visit the app at [http://localhost:3000](http://localhost:3000) and start making requests:
