Skip to content

linjekoll/mainline-static-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mainline static server

Production port is 31415.

How set up

Start by cloning the project using git.

git clone git@github.com: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"
}]

About

Mainline used in development - returns static data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages