Skip to content

Commit

Permalink
Added instructions on how to use the ActiveRecord example
Browse files Browse the repository at this point in the history
  • Loading branch information
djones committed May 2, 2012
1 parent e32dd42 commit 67ca4ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/activerecord/srv.rb
Expand Up @@ -9,6 +9,15 @@
# create table users (id int not null auto_increment primary key, name varchar(255), email varchar(255));
# insert into users (name, email) values ('dan', 'dj2@everyburning.com'), ('Ilya', 'ilya@igvita.com');

# To start server
# ruby ./srv.rb
#
# Example output:
# curl http://localhost:9000/?id=1
#=> "{\"user\":{\"email\":\"dj2@everyburning.com\",\"id\":1,\"name\":\"dan\"}}"
# curl http://localhost:9000/?id=2
#=> "{\"user\":{\"email\":\"ilya@igvita.com\",\"id\":2,\"name\":\"Ilya\"}}"

$: << "../../lib" << "./lib"

require 'goliath'
Expand Down

0 comments on commit 67ca4ed

Please sign in to comment.