All results are in plain text, separated by commas.
If an invalid bus stop number
or bus service number
is supplied, the page responds 404 Not Found
with a 404 HTTP status.
e.g. https://cs2030-bus-api.herokuapp.com/bus_services/95
Bus stops served by a particular bus service
e.g. https://cs2030-bus-api.herokuapp.com/bus_stops/18331
Bus services that serve a particular bus stop
e.g. https://cs2030-bus-api.herokuapp.com/bus_stops/18331/nearby
Bus stops that are within a 5-minute walking distance (~400m) of a particular bus stop
This guide assumes that you are developing on macOS.
-
Install PostgreSQL (Recommended: Postgres.app or via Homebrew)
-
Clone the repo and
cd
into it -
Run
gem install bundler
, followed bybundle
to install all dependencies -
Run
rails db:setup
to create the database and populate the seed data -
Start the server with
rails s
and visitlocalhost:3000
to test that it works on your local machine