diff --git a/index.html b/index.html
deleted file mode 100644
index a8577be..0000000
--- a/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- Libcasa-Chan
-
-
-
-
-
diff --git a/pages/index.html b/pages/index.html
index 453255a..7fe43fb 100644
--- a/pages/index.html
+++ b/pages/index.html
@@ -1,7 +1,9 @@
+
Libcasa-Chan
+
@@ -12,6 +14,8 @@
Home
+
+
diff --git a/server.js b/server.js
index bda14ae..aa2dd20 100644
--- a/server.js
+++ b/server.js
@@ -2,10 +2,19 @@ const http = require("http");
const fs = require("fs");
const server = http.createServer((req, res) => {
+ if (req.url === "/styles/styles.css" ) {
+ res.statusCode = 200;
+ res.setHeader("Content-Type", "text/css");
+ fs.readFile("styles/styles.css", function(error, data) {
+ res.write(data);
+ res.end();
+ });
+ }
+
if (req.url === "/") {
res.statusCode = 200;
res.setHeader("Content-Type", "text/html");
- fs.readFile("index.html", function(error, data) {
+ fs.readFile("./pages/index.html", function(error, data) {
if (error) {
res.writeHead(404);
res.write("Error: File not found.");
@@ -13,9 +22,24 @@ const server = http.createServer((req, res) => {
res.write(data);
}
res.end();
- })
+ });
}
-})
+
+ if (req.url === "/about") {
+ res.statusCode = 200;
+ res.setHeader("Content-Type", "text/html");
+ fs.readFile("./pages/about.html", function(error, data) {
+ if (error) {
+ res.writeHead(404);
+ res.write("Error: File not found.");
+ } else {
+ res.write(data);
+ }
+ res.end();
+ });
+ }
+
+});
const port = process.env.port || 8000;
diff --git a/styles/styles.css b/styles/styles.css
new file mode 100644
index 0000000..c272186
--- /dev/null
+++ b/styles/styles.css
@@ -0,0 +1,8 @@
+body {
+ background-color: black;
+ font-family: sans-serif;
+}
+
+.title {
+ color: white;
+}