Skip to content

marciocorrrea/web-scraping-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use

Method URL Return
get http://ec2-18-218-130-166.us-east-2.compute.amazonaws.com:3000/scrape/${REPOSITORY} statistics

Requests examples

http://ec2-18-218-130-166.us-east-2.compute.amazonaws.com:3000/scrape/marciocorreadev/teste
http://ec2-18-218-130-166.us-east-2.compute.amazonaws.com:3000/scrape/https://github.com/marciocorreadev/teste
http://ec2-18-218-130-166.us-east-2.compute.amazonaws.com:3000/scrape/github.com/marciocorreadev/teste

Response example

{
  "statistics": [
    {
      "bytes": 7,
      "count": 1,
      "extencion": "md",
      "lines": 1
    },
    {
      "bytes": 1608,
      "count": 1,
      "extencion": "gitignore",
      "lines": 104
    }
  ]
}

Running

Running with Docker image

docker pull marciocorrea/web-scraping-github:latest
docker run -p ${PORT}:3000 marciocorrea/web-scraping-github

curl http://localhost:${PORT}/scrape/${REPOSITORY}

Running local

git clone https://github.com/marciocorreadev/web-scraping-github.git
cd web-scraping-github
npm run dev

curl http://localhost:3000/scrape/${REPOSITORY}

Testing

npm run test

About

Api node to read a github repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published