Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

CSS and JS does not load. #9

Open
c8hunderscore opened this issue Nov 6, 2021 · 1 comment
Open

CSS and JS does not load. #9

c8hunderscore opened this issue Nov 6, 2021 · 1 comment

Comments

@c8hunderscore
Copy link

At first I tried to host this on my local machine and port forward, but I did not realize my chromebook blocks viewing websites directly from IP addresses, you had to use a domain name instead. Everything worked on localhost though. I decided to stick with Heroku, but when I used it, scripts and stylesheets did not load.

I did not look through the code to figure out the problem, but I'm guessing that requests to these paths are either:

  • not proxied
  • not proxied correctly (/index.js instead of /service/url/index.js)

I am happy to give more info if you need it.

@mbhardt
Copy link

mbhardt commented Nov 10, 2021

Same issue here. After looking at the webserver code for a bit, I found out that index.html in the pages directory didn't use any CSS at all. However, template.html had a stylesheet attached to it and looked exactly like incog.dev and its mirror sites.

A simple fix that should work for now is moving template.html to the pages folder and changing line 26 from [ '/', 'home', path.join(__dirname, 'pages', 'index.html') ], to [ '/', 'home', path.join(__dirname, 'pages', 'template.html') ],

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants