This is the solution to a test proposed as part of a job selection process. The task was to fetch and persist data from two government agencies web pages. The index page should display the headlines and allow us to filter them, with pagination.
The crawler runs in the background. You can close the page or navigate through the results as they come in. Initial fetch could last up to 10 min.
You can run this in three different ways. First step is always the same: clone this repo
git clone git@github.com:lcppcoding/dsb_news.git
cd dsb_newsRun the compose file based on prebuilt image
cd built
docker-compose upOr in detached mode
cd built
docker-compose up -ddocker-compose upSame final option '-d' available
Use
docker-compose stopTo stop container
Finally, you can just run the rails application directly. Ruby version is 3.0.2 and DB is Postgresql
git checkout no_docker
bundle install
rails db:create
rails db:migrate
rails s