引导CSS和JS不在heroku上加载 [英] bootstrap CSS and JS not loading on heroku

查看:75
本文介绍了引导CSS和JS不在heroku上加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与Node.JS和Socket.io建立了一个聊天室.我在项目中使用Bootstrap CSS和JS处理选项卡和旋转木马.该网站在我的本地服务器上的外观和工作情况都非常完美,下面是一些屏幕截图:

I made a chatroom with Node.JS and Socket.io. I'm using bootstrap CSS and JS in my project for things like tabs and carouser. The website looks and works perfect on my local server, here aresome screenshots:

但是当我在github上推送相同的代码并将其部署在heroku上时,一切都变得混乱了: https: //doclerchat.herokuapp.com/

but when I pushed the same code on my github and deployed it on heroku, every thing is just cluttered: https://doclerchat.herokuapp.com/

以下是GitHub上的源代码: https://github.com/anshul119/chatapp/

Here is the source code on GitHub: https://github.com/anshul119/chatapp/

Bootstrap CSS和JS之类的内容似乎并未加载,这就是为什么只有那些特定的东西才产生问题的原因.我该如何解决这个问题?

Seems like Bootstrap CSS and JS aren't loading thats why only those specific things are creating problems. How can I resolve this issue?

感谢您的帮助.

推荐答案

因此,正如@vanburen所说,这解决了问题:

So, as @vanburen commented, this solved the problem:

将您对CDN的请求从http更改为https: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstra‌​p.min.csshttps://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap‌​.min.js

Change your requests to the CDN from http to https: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstra‌​p.min.css and https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap‌​.min.js

这篇关于引导CSS和JS不在heroku上加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆