3

i have a question regarding Grape for building an API-only rails app. As I read in the github docs, Grape can be mounted as an API for an existing rails app. Is it possible to write a API-only app with it? Am I right, that I don't need rails controllers any longer when using Grape?

thanks in advance!

dB.
  • 4,700
  • 2
  • 46
  • 51
trnc
  • 20,581
  • 21
  • 60
  • 98

2 Answers2

2

You are right.

Also, if I am not mistaken, you don't even need Rails at all. Grape is a micro-framework which can run standalone. If you have plans to expand however and incorporate active-record/model etc than you could mount Grape and expand at your own pace.

Yuri
  • 1,261
  • 1
  • 11
  • 23
  • yeah i'm using active record and some other rails stuff. so i just skip filling up controllers and use grape instead? sounds good. thanks! – trnc Aug 11 '12 at 09:31
0

Yes. Grape works on Rack. See https://github.com/dblock/grape-on-rack for an example.

dB.
  • 4,700
  • 2
  • 46
  • 51