1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +00:00

WebServer: Implement a very basic HTTP server :^)

This server listens on port 8000 and serves HTML files from /www.
It's very simple and quite naive, but I think we can start here and
build our way to something pretty neat.

Work towards #792.
This commit is contained in:
Andreas Kling 2020-02-09 12:04:58 +01:00
parent 271bc4b2f2
commit 6c752c15a2
8 changed files with 198 additions and 1 deletions

18
Base/www/index.html Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE>
<html>
<head><title>WebServer start page!</title></head>
<body>
<h1>SerenityOS WebServer start page!</h1>
<p>
<b>Congratulations!</b>
</p>
<p>
If you are reading this in a browser, I think we may have
succeeded! Unless of course you just loaded the local file
in your browser (cheater!) :^)
</p>
<p>
Try this <a href="other.html">link</a> to another page!
</p>
</body>
</html>

16
Base/www/other.html Normal file
View file

@ -0,0 +1,16 @@
<!DOCTYPE>
<html>
<head><title>WebServer other page!</title></head>
<body>
<h1>SerenityOS WebServer other page!</h1>
<p>
<b>Holy moly!</b>
</p>
<p>
This is not even index.html, how neat is that! :^)
</p>
<p>
Maybe you want to go <a href="index.html">back to index.html</a>?
</p>
</body>
</html>