Share your repls and programming experiences

← Back to all posts
Presenting... 📋 Minified 1 File HTML Website w/ CSS & Server 📋
h
RayhanADev

Through an interesting chain of experiments, I have reduced a typical website with backend, css, etc. down to a single .js file with three lines!

Presenting... 📋 Minified 1 File HTML Website w/ CSS & Server 📋

This .js file only occupies three (long) lines and uses ExpressJS to send a line of text that’s stored in a variable and sets the headers to allow it show the site!

Line #1 —>

Line #2 —>

Line #3 —>

^ The code (don’t account for text-wrapping) ^

This is just made for fun, and honestly isn’t a recommended way to create a website, but you should try it out if you ever feel bored! Check the code out here and take a look at the site here.

Got any questions, comments, or ideas to minify this even more. Let me know in the comments below!

Voters
fuzzyastrocat
RayhanADev
Comments
hotnewtop
fuzzyastrocat

Nice, but it could be all one line! :D

RayhanADev

@fuzzyastrocat lmao, sure it could be. For the sake of my braincase i kept it three lines xD.

RayhanADev

@fuzzyastrocat btw, you wanna know what’s more boring than watching paint dry?

fuzzyastrocat

@RayhanADev Waiting for repl.it notifications?

RayhanADev

@fuzzyastrocat yes
Waiting for a web-crawler to visit every single Repl.it post xD.

fuzzyastrocat
RayhanADev

Should I add a more sensible version of this to the templates section xD.