Sinatra app 404 not found in Middleman

With my Middleman site, I mounted a Sinatra app to handle some of the form POST requests.

In config.rb:

require lib/app
use App
map("/my_form") do
    run App
end

In lib/app:

require 'sinatra'
class App < Sinatra::Base
    post '/' do
        stuff
    end
end

This works fine locally. However when i deploy my site to Netlify and try to make the form request, it gives me a 404 Not Found. Any idea why this might be?