Serving static files with Sinatra

后端 未结 14 1773
渐次进展
渐次进展 2020-11-29 16:38

I have one page website only using HTML, CSS and JavaScript. I want to deploy the app to Heroku, but I cannot find a way to do it. I am now trying to make the app working wi

14条回答
  •  暖寄归人
    2020-11-29 16:45

    http://sinatrarb.com/configuration.html#static---enabledisable-static-file-routes

    This would be the correct way of doing it.

    set :public_folder, 'public'
    

    I used the static setting because it's setting can affect the public_folder usage.

提交回复
热议问题