Skip to content

Selharem/Express-Github-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express-Github-API

This a REST microservice developed using Expressjs.

Functional specs

  • 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.

Technologies Used

  • 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.

Available Endpoints

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

Expected response

{
  "total_count": "x",
  "result": [
     {
         "language": "languageX",
         "number of repos": "x",
         "repos ": [
             "repo1",
                 ...
             "repoN"
         ]
     },
        ...
  ]
}

Getting Started

  • 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 !

Happy Coding

Made with ❤️ By Elharem Soufiane