This API scrapes quotes from quotes.toscrape.com
and returns them in JSON format.
- Clone this repository:
git clone https://github.com/marcusziade/goscrapequotes.git
cd goscrapequotes
- Download Go dependencies:
go mod download
- Run the application:
go run .
Visit http://localhost:8080/quotes
in your browser or using tools like Postman to see the scraped quotes.
- Build the Docker image:
docker build -t goscrapequotes .
- Run the Docker container:
docker run -p 8080:8080 goscrapequotes
Visit http://localhost:8080/quotes
to access the API.
Run the tests using the command:
go test
- Fork the repository.
- Create a new branch for your feature or fix.
- Write your code and tests.
- Open a pull request against the
master
branch.
This project is licensed under the MIT License - see the LICENSE file for details.