如何将reagent-frontend部署到Heroku?

3
我使用模板reagent-frontend创建了一个ClojureScript Reagent应用程序。如何将生产应用程序部署到Heroku?在构建生产环境之后(lein package/ lein cljsbuild once release),leiningen会在public文件夹中生成app.js。因此,public文件夹包含css/、js/和index.html。
当我尝试推送public文件夹时,Heroku出现以下错误:

 !     No default language could be detected for this app.

            HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.

            See https://devcenter.heroku.com/articles/buildpacks

 !     Push failed
1个回答

2
Heroku可以提供PHP服务,因此一种方法是在public文件夹中添加一个index.php文件,并包含以下内容:<?php header( 'Location: /index.html' ) ; ?> 这将提供您自己的index.html。然后将其推送到Heroku。
来源:https://blog.teamtreehouse.com/deploy-static-site-heroku

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接