Ask coding questions

← Back to all posts
How do I make html in a node server?
PandaTheBear

I am making a discord-sorta project for me and my friends, but it is making the HTML files into JavaScript files. How do I prevent this?

Voters
PandaTheBear
Comments
hotnewtop
codeitfast

wait lol you already fixed it

PandaTheBear

@codeitfast If you inspect at the link (https://ToolkitServer.pandathebear.repl.co) then you will see the error.

codeitfast

@PandaTheBear its only a syntax error, I think. API test apparently has an extra '<'

PandaTheBear

@codeitfast If it is a syntax error, where is it? apicheck doesn't have a '<' in it.

PandaTheBear

@codeitfast It is calling index.html the apicheck file. It thinks it is javascript, and is renaming it, but it is not, so it thinks there is an extra '<'.

codeitfast

@PandaTheBear I know lol, which is a weird error. I had similar problems (the main.js didn't even run on one of my projects.)

codeitfast
codeitfast

try

MrVoo

You have to add .html on to the end.

PandaTheBear

By the way, it is only when you go to toolkit.pandathebear.repl.co/public/apicheck_001-28.js when you get to see the error i am having. go to sources once you are there.