https://github.com/ruby-grape/grape-on-goliath
A demo of Grape mounted behind a Goliath web server.
https://github.com/ruby-grape/grape-on-goliath
Last synced: 11 months ago
JSON representation
A demo of Grape mounted behind a Goliath web server.
- Host: GitHub
- URL: https://github.com/ruby-grape/grape-on-goliath
- Owner: ruby-grape
- Created: 2013-10-20T13:16:59.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2018-11-03T19:57:04.000Z (over 7 years ago)
- Last Synced: 2025-04-26T20:34:03.921Z (over 1 year ago)
- Language: Ruby
- Size: 15.6 KB
- Stars: 46
- Watchers: 4
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Grape API on Goliath
====================
[](http://travis-ci.org/ruby-grape/grape-on-goliath)
[](https://gemnasium.com/ruby-grape/grape-on-goliath)
A [Grape](http://github.com/ruby-grape/grape) API mounted on [Goliath](http://postrank-labs.github.io/goliath), a non-blocking Ruby web server framework.
* [ping](api/ping.rb): a hello world example that returns a JSON document
Heroku
------
Grape-on-goliath is deployed on Heroku at [grape-on-goliath.herokuapp.com](http://grape-on-goliath.herokuapp.com/api/ping).
Run
---
```
$ bundle install
$ bundle exec ruby app.rb -sv
[92117:INFO] 2013-10-18 12:54:33 :: Starting server on 0.0.0.0:9000 in test mode. Watch out for stones.
```
### Hello World
Navigate to http://0.0.0.0:9000/api/ping with a browser or use `curl`.
```
$ curl http://0.0.0.0:9000/api/ping
{"ping":"pong"}
```
List Routes
-----------
```
rake routes
```