Hosting RESTFul api on sub-subdomain in heroku? -
i developing app on ruby on rails created restful json api hosted on subdomain "api". when testing locally prax on linux machine, able test endpoints routing various endpoints
- "api.app_name.dev/resources"
- "api.app_name.dev/resources/1".
now, have been instructed host rails application on free heroku account time being other developers can test api.
however,i can't work. main application subdomain heroku app itself.the url main application "app_name.herokuapp.com". can't connect "api.app_name.herokuapp.com" sub-subdomain of application.
is there way can test api heroku? or possibly workaround ??
it sounds need set correct subdomain constraint in routes,
namespace :api, defaults: { format: :json }, constraints: { subdomain: 'api.app_name' }, path: '/' ... thing end
also, if helps, check this if of help
Comments
Post a Comment