https://github.com/ivantjh/sgshowtimesapi
Scrapes Singapore movie showtimes
https://github.com/ivantjh/sgshowtimesapi
movies ruby showtimes singapore
Last synced: 7 months ago
JSON representation
Scrapes Singapore movie showtimes
- Host: GitHub
- URL: https://github.com/ivantjh/sgshowtimesapi
- Owner: ivantjh
- Created: 2017-04-02T14:54:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T19:16:18.000Z (over 3 years ago)
- Last Synced: 2025-04-07T12:52:16.449Z (about 1 year ago)
- Topics: movies, ruby, showtimes, singapore
- Language: Ruby
- Homepage:
- Size: 540 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sgShowtimesApi
Scrapes Singapore showtimes
## Development
1. Install `phantomjs` and `ruby 2.7`
2. Install the `bundler` gem and run `bundle install`
3. Set up database
4. Run `ruby server.rb`
### To test web scraper
1. Run `irb` (`ruby` interpreter) in home directory
2. Type `load "./app/scraper/scraper.rb"` into `irb`
3. Type `Scraper.start_scraper` to test
### To set up database
1. Run `rake db:environment:set` if needed
2. Run `rake db:setup`
## Deployment
1. Install `phantomjs` and `ruby 2.7`
2. Install the `bundler` gem and run `bundle install --production`
3. Add the scraper and maintenance task to cron using `bundle exec whenever -w`
### Database
1. Install `postgresql` and create a new database according to `config/database.yml`. Follow the production section for configuration
2. 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`
[API Documentation](docs/api-ref.md)