Skip to content

A Node server to fetch GitHub data every 12 hours to avoid exceeding the rate limit!

License

Notifications You must be signed in to change notification settings

yashsuhagiya/github-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Data API

Description

This is a simple API that returns data from GitHub. Why? There is a limit of 60 requests per hour for unauthenticated requests to the GitHub API. This API caches the data for 12 hour and returns it to the user. This way, the user can make as many requests as they want to this API and the API will handle the rate limiting. It is written in Node.js and uses the Express framework.

Installation

  1. Clone the repository
git clone https://github.com/yashsuhagiya/github-api.git
  1. Install dependencies
npm install
  1. Change the username in server.js
const response = await fetch("https://api.github.com/users/{your-username}/repos");
  1. Run the server
npm run dev
  1. For production, host the server on a cloud platform like Vercel with given vercel.json file

Usage

The API has one endpoint:

  • /githubdata - returns the github data for the user

License

MIT

Author

Yash Suhagiya

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

A Node server to fetch GitHub data every 12 hours to avoid exceeding the rate limit!

Resources

License

Stars

Watchers

Forks