Scrapes Singapore showtimes
- Install
phantomjs
andruby 2.7
- Install the
bundler
gem and runbundle install
- Set up database
- Run
ruby server.rb
- Run
irb
(ruby
interpreter) in home directory - Type
load "./app/scraper/scraper.rb"
intoirb
- Type
Scraper.start_scraper
to test
- Run
rake db:environment:set
if needed - Run
rake db:setup
- Install
phantomjs
andruby 2.7
- Install the
bundler
gem and runbundle install --production
- Add the scraper and maintenance task to cron using
bundle exec whenever -w
- Install
postgresql
and create a new database according toconfig/database.yml
. Follow the production section for configuration - Run
RACK_ENV='production' bundle exec rake db:setup
to setup and seed the database
Lastly, run the server in production using
RACK_ENV='production' ruby server.rb