rake routes command on grape gem

At April 2013 I write a small article in Portuguese about rails rake routes command on grape gem. I will translate here:

First create a Rakefile:

desc "API Routes"
task :routes do
  MyProject::API.routes.each do |api|
    method = api.route_method.ljust(10)
    path = api.route_path
    puts "     #{method} #{path}"
  end
end

Don’t forget change MyProject::API to your class, não run:

$ rake routes
     GET        /resourceX(.:format)
     GET        /resourceX/:id(.:format)
     POST       /resourceX
     ...
 
120
Kudos
 
120
Kudos

Now read this

Tip Golang with EmberJS - JSON Response

If you are search a article step-by-step there are 3 good post by @nerdyworm Building an App With Ember.js and Go - Part 1 Building an App With Ember.js and Go - Part 2 Building an App With Ember.js and Go - Part 3 This post is about my... Continue →