Yeoman构build的angular色应用程序不部署引导字体到heroku

前面,我已经解决了这个错误。 这只是其他人碰到的参考。

我已经使用本指南部署了一个Yeoman构build的应用程序heroku: http : //www.sitepoint.com/deploying-yeomanangular-app-heroku/

除了需要删除线路之外,指南几乎完美无缺:

app.use(express.logger('dev')); 

一旦部署,与引导包装glyphicons正在返回404。经过多次挖掘我意识到:

 dist/bower_components 

文件夹没有被添加到git存储库,因为我的.gitignore里面有这条线:

 // .gitignore file // node_modules .tmp .sass-cache bower_components // This line! 

删除意味着提交我的整个bower_components文件夹到Git仓库,我没有看到必要的。 相反,我将以下内容添加到.gitignore中:

 // .gitignore file // node_modules .tmp .sass-cache bower_components !dist/bower_components 

现在,dist / bower_components被添加到资源库中,并按照预期部署到Heroku。

好post,埃里克。 当我试图让我的英雄人物项目在heroku上运行时,我遇到了这些问题。 我会补充说,如果你想运行一些像logging器,它现在被称为摩根。 所以你仍然需要用你的代码replacelogger行:

  var morgan = require('morgan'); app.use(morgan('dev')); 

这将使您能够在您的应用程序上使用日志logging模块,如果你想这样做。 这是一个真正的痛苦,并花了一段时间才弄清楚。 干杯!