是否有可能上传一个简单的HTML和JavaScript文件结构到Heroku? [英] Is it possible to upload a simple html and javascript file structure to heroku?
问题描述
我试图将我的一个开源项目部署到heroku,只需要静态html和javascript就非常简单。但他们不支持静态网站吗?我不想让它成为一个Sinatra项目,如果我不打算使用除html和javascript之外的其他任何东西。
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? I'd rather not make it a Sinatra project if I don't plan on ever using anything but html and javascript.
~/sites/d4-site $ heroku create --stack cedar
Creating quiet-ice-4769... done, stack is cedar
http://quiet-ice-4769.herokuapp.com/ | git@heroku.com:quiet-ice-4769.git
Git remote heroku added
~/sites/d4-site $ git remote -v
heroku git@heroku.com:quiet-ice-4769.git (fetch)
heroku git@heroku.com:quiet-ice-4769.git (push)
~/sites/d4-site $ git push heroku master
Counting objects: 53, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (49/49), done.
Writing objects: 100% (53/53), 206.08 KiB, done.
Total 53 (delta 4), reused 0 (delta 0)
-----> Heroku receiving push
-----> Removing .DS_Store files
! Heroku push rejected, no Cedar-supported app detected
推荐答案
您可以使用机架来做到这一点:
You can use rack to do this:
https://devcenter.heroku.com/articles/static-sites-on-heroku
或者您可以使用Octopress / Jekyll谁使用sinatra。
or you can use something like Octopress/Jekyll who uses sinatra.
但你需要一个最小的堆栈来提供HTML静态内容
But you need a minimum stack to serve html static content
这篇关于是否有可能上传一个简单的HTML和JavaScript文件结构到Heroku?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!