Is it possible to upload a simple html and javascript file structure to heroku?

前端 未结 10 1585
逝去的感伤
逝去的感伤 2020-12-04 06:25

I\'m trying to deploy an open source project of mine to heroku, it is by necessity very simple with just static html and javascript. But do they not support static sites?

10条回答
  •  生来不讨喜
    2020-12-04 07:01

    I know this might be a little old but I ended up using Vienna Gemw to deploy this, basically its a small Rack application that will let you serve everything in your public folder (css, images, js, html) with just a couple of lines of Ruby:

    require 'vienna'
    run Vienna
    

    Also, for deploying this on heroku you need to create a Gemfile:

    source 'https://rubygems.org'
    gem 'rack'
    gem 'vienna'
    

    Then run bundle install, in case you don't have the bundle gem installed just run on your terminal:

    sudo gem install bundle
    

    And thats pretty much of it, you can have more information on: http://kmikael.com/2013/05/28/creating-static-sites-in-ruby-with-rack/

提交回复
热议问题