3

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:

lading page

photos page

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

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

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

Any help is appreciated.

4
  • Hey brother, did you check your browser's console? My browser's console renders this. In index.html try have a reference to Bootstrap in the Heroku app space (i.e. js/bootstrap.min.js etc) rather than using a remote resource. Commented Nov 14, 2015 at 22:00
  • 4
    Try changing your requests to the CDN from http to https: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css and https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js Commented Nov 14, 2015 at 22:12
  • Thank you @vanburen adding https solved the issue! Commented Nov 15, 2015 at 7:04
  • Hey @RichardKennethNiescior yes then it would work but I wanted to make it work with CDN only. the problem is solved by replacing "http" with "https" Commented Nov 15, 2015 at 7:05

1 Answer 1

3

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

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

Sign up to request clarification or add additional context in comments.

1 Comment

how to use it? in reactjs?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.