Skip to content

linjekoll/provider-server-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

External Provider API

Production port is 31415.

How set up

Start by cloning the project using git.

git clone git@github.com:linjekoll/provider-server-ruby.git

Navigate to the downloaded folder and run bundler.

cd provider-server-ruby && 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

Beanstalkd needs to be started manually using beanstalkd.

Requests

POST /

data = {
  this: "could",
  be: "any",
  anything: nil
}.to_json

RestClient.get("http://localhost:31415/", data)

Status codes

  • 400 Wrong arguments, in most cases invalid JSON data.
  • 200 Everything went okey.
  • 500 Internal problems.

Releases

No releases published

Packages

No packages published

Languages