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
get "/subdirectory/:file" do
file = params[:file] + "index.html"
if File.exists?(params[:file])
return File.open("subdirectory/" + file)
else
return "error"
end
end
so if you now navigate to (for example) /subdirectory/test/ it will load subdirectory/test/index.html