Closed jnewman12 closed 8 years ago
The only thing with that, is that the app is already on a subdomain, you can change the routes files to something like this:
#From this:
namespace :api, defaults: { format: :json }, constraints: { subdomain: 'api' }, path: '/' do
...
end
#To this
namespace :api, path: '/api' do
...
end
And you can access the api through http://heroku_name.herokuapp.com/api/any_resource
If you buy a domain for your app, you can change to the subdomain way.
awesome, will do! thanks for the great resource too :)
not sure if this is the right place for this, but I'm having an issue. everything is done, tests are passing, and i deployed it to heroku. When it's actually on production, what would the address be? according to the development structure of accessing the app via
http://api.repo_name.dev/
, the heroku equivalent should behttps://api.heroku_name.herokuapp.com
right?On development, if I go into my browser and type
http://api.marketplaceapi.dev/products
i get a json response. However if I make a curl request tohttps://api.heroku_name.herokuapp.com/products
I getHeroku | No such app
.with the api subdomain set, would you know how to go about accessing the endpoints in production?