Heroku app: TBD(To be determined)
This is sample project that crawling the latest best news and show them.
- Current ruby version 3.0.0
- Bundler version 2.2.3
- Rails version 6.1.X
- Mysql
- Tailwindcss
Some main gems such as:
- puma
- bootsnap
- dotenv
- nokogiri
- ruby-readability
- httparty
- redis-rails
- fastimage
- ....
-
Clone this repo:
git clone https://github.com/nhthach/crawler_bot.git crawler_bot cd crawler_bot
-
Clone .env_example to .env for local development. We set it up with default rails 3000 and client 8000 ports:
cp .env_example .env
-
Install the dependencies:
bundle install yarn install
-
Run DB
Make sure the Mysql is running on localhost.
rake db:create rake db:migrate
-
Run redis server
a. Install
redis
server:brew install redis
b. Run
redis
server:redis-server
-
Run the development server:
rails s
- You can run rake task by manual:
rails scheduler:crawling
- Access
http://localhost:3000/
. Let's enjoy the result :)