diff --git a/pages/about.html b/pages/about.html new file mode 100644 index 0000000..472a7ed --- /dev/null +++ b/pages/about.html @@ -0,0 +1,23 @@ + + + + + About + + + +
+ +
+

About Us.

+
+
+

We are a streaming service that emphasises the freedom of all it's users -- viewers and streamers alike.

+
+
+ + diff --git a/pages/home.html b/pages/home.html index 9b1eae1..d550bf1 100644 --- a/pages/home.html +++ b/pages/home.html @@ -7,9 +7,13 @@
-

Logged in.

- Back home - Log Out + +
+

You are now logged in.

+
diff --git a/pages/news.html b/pages/news.html new file mode 100644 index 0000000..ed88634 --- /dev/null +++ b/pages/news.html @@ -0,0 +1,23 @@ + + + + + Anarchy News + + + +
+ +
+

News

+
+
+

No news so far...

+
+
+ + diff --git a/server.js b/server.js index f597891..61d7898 100644 --- a/server.js +++ b/server.js @@ -88,6 +88,36 @@ const server = http.createServer((req, res) => { }); } + if (req.url === "/about") { + res.statusCode = 200; + res.setHeader("Content-Type", "text/html"); + fs.readFile("pages/about.html", (error, data) => { + if (error) { + res.writeHead(404); + res.write("Error: File not found."); + } else { + res.write(data); + } + + res.end(); + }); + } + + if (req.url === "/news") { + res.statusCode = 200; + res.setHeader("Content-Type", "text/html"); + fs.readFile("pages/news.html", (error, data) => { + if (error) { + res.writeHead(404); + res.write("Error: File not found."); + } else { + res.write(data); + } + + res.end(); + }); + } + if (req.url === "/members" && req.method === "POST") { res.statusCode = 200; //res.setHeader("Content-Type", "text/json");