I'm trying to add a route to my dashing application that will receive data from a webhook.
I tried using the solution here, and while that did create the route, it broke the dashing dashboard at '/sample'.
Any ideas?
Here is my lib/app.rb:
require 'sinatra/base'
class App < Sinatra::Base
get '/callback' do
"Callback route."
end
end
Here is my config.ru:
require 'dashing'
configure do
set :auth_token, 'YOUR_AUTH_TOKEN'
helpers do
def protected!
# Put any authentication code you want in here.
# This method is run before accessing any resource.
end
end
end
map Sinatra::Application.assets_prefix do
run Sinatra::Application.sprockets
end
run Sinatra::Application
run App
UPDATE:
I changed the route name to something obscure (so that the mount for sure doesn't use it). It looks like whichever run command I put last is the one that takes effect. The route works if run App is last, the dashboard works if run Sinatra::Application is last. But when one works, the other doesn't