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

前端 未结 10 1548
逝去的感伤
逝去的感伤 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:00

    Here is what worked for me:

    cd myProject 
    git init
    heroku create myApp 
    heroku git:remote -a myApp 
    

    If the entry point is main.html, create index.php with this single line of content:

    
    

    and then perform the following steps:

    echo '{}' > composer.json 
    git add . 
    git commit -am "first commit" 
    git push heroku master
    

    Go to http://myApp.herokuapp.com/ and your app should be online now.

提交回复
热议问题