I've created the application on Sinatra, which represents a simple API. I want to make deployment on production and development. I want to choose during deployment, whether it should be dev or production, and the logic of some methods should change, depending on deployment type. Is there any idea, how it can be done and some example of solving this issue.
Example: I have code
get '/api/test' do
return "It is dev"
end
but after deployment to production I would like see after run /api/test
It is PROD
How it can be done?