Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 933 Bytes

Readme.md

File metadata and controls

48 lines (31 loc) · 933 Bytes

Mainline static server

Production port is 31415.

How set up

Start by cloning the project using git.

git clone [email protected]:linjekoll/mainline-static-server.git

Navigate to the downloaded folder and run bundler.

cd mainline-static-server && bundle install

Server start [production]

bundle exec ruby server.rb -p 31415

Server start [development]

bundle exec shotgun start.ru -p 31415

Using shotgun will cause the server to restart everytime server.rb is changed.

... or start the server using foreman.

foreman start

Requests

GET /lines/:line_id/stops

Returns a list of stops for the given station line_id.

[{
  "name": "Mölndals sjukhus",
  "id": 2,
  "time_from_prev_station": 120,
  "destination_station": 4,
  "origin_station": 1,
  "sid": "00012130"
}]