HTML, CSS, JS Error Pages
Galamphin (100)

Say you created a new repl called, bob.repl.co (I know this wouldn't be possible, it's just an example), and in the repl you created multiple HTML files, eg. index.html, about.html, hello.html ect.

If you typed in bob.repl.co/hello.html it would take you to that page.
So, I was thinking it would be really cool if you could make your own customised error page, not just the one that pops up made by repl.

So if you typed in bob.repl.co/jeff.html instead of it taking you to this page:

It takes you to a custom error page, designed by you!

You are viewing a single comment. View All
Answered by PYer (2309) [earned 5 cycles]
View Answer
TheDrone7 (550)

Although you can already do it if you make your own backend using node.js or python or any other backend language.

PYer (2309)

@TheDrone7 Can you give me an example?

TheDrone7 (550)

@PYer https://repl.it/@TheDrone7/Trendy, you can see there I have defined my own custom error page. I'm not quite sure how I would do that in python but pretty sure you can do that.

Galamphin (100)

@TheDrone7 that's really clever! I'm not very experienced with JS, so how would you implement that to a HTML,CSS,JS setup?

TheDrone7 (550)

@Galamphin I believe you won't be able to achieve that if you stick to frontend, also, I believe that repl.it itself uses my technique for showing the error page. You can always easily get started with js here. And as for the backend version (or node.js) you can click here.

coderash (66)

@TheDrone7 , could you tell me the code for a JS error page?

Galamphin (100)

@TheDrone7 could you specify were in the code the error page code is?

TheDrone7 (550)

@Galamphin it's inside the views directory, the layout page has the main layout and the error file had the content to be displayed on the error page.