This a REST microservice developed using Expressjs.
- The API lists the languages used by the trending public Github repos.
- It calculates the total number of the repos (100 repos - repos with
null
language) - For every language, it returns :
- The number of repos using that language.
- The list of those repos.
- Nodejs : JavaScript runtime enviromment.
- Express: Node.js web application server framework.
- axios : Promise based HTTP client for the browser and Node.js.
- GitHub REST API : APIs to interact with Github and fetch public informations about it.
- Moment.js : JavaScript date library.
Verb | endpoint | description |
---|---|---|
GET | /api/repos/ | Lists the trending languages in the last 30 days |
GET | /api/repos/{date} | Lists the trending languages in the last 30 days from the given date |
{
"total_count": "x",
"result": [
{
"language": "languageX",
"number of repos": "x",
"repos ": [
"repo1",
...
"repoN"
]
},
...
]
}
- Clone the repo :
git clone https://github.com/Selharem/Express-Github-API.git
- Install the dependencies :
npm install
- Start the server :
npm start
Now, the app is running at http://localhost:5000 !
Made with ❤️ By Elharem Soufiane