What is the better way to make API with Rails?

973 Views Asked by At

What is the better way to create API with Rails:

  1. Create mountable rails engine in main application. In routes set url path for api: example.com/api/v1.
  2. Create separately app with rails-api gem and make subdomain for api: api.example.com/v1.
1

There are 1 best solutions below