/goscrapequotes

Backend service that provides quotes

Primary LanguageGo

Go Quotes Scraper API 🚀

This API scrapes quotes from quotes.toscrape.com and returns them in JSON format.

Prerequisites

Getting Started

Running locally

  1. Clone this repository:
git clone https://github.com/marcusziade/goscrapequotes.git
cd goscrapequotes
  1. Download Go dependencies:
go mod download
  1. Run the application:
go run .

Visit http://localhost:8080/quotes in your browser or using tools like Postman to see the scraped quotes.

Running with Docker

  1. Build the Docker image:
docker build -t goscrapequotes .
  1. Run the Docker container:
docker run -p 8080:8080 goscrapequotes

Visit http://localhost:8080/quotes to access the API.

Testing

Run the tests using the command:

go test

Contributing

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Write your code and tests.
  4. Open a pull request against the master branch.

License

This project is licensed under the MIT License - see the LICENSE file for details.