A heading here
+Posted by John Doe
+Some additional information here
+Lorem Ipsum dolor set amet....
+diff --git a/run.js b/run.js index 9986384..880d05f 100644 --- a/run.js +++ b/run.js @@ -36,9 +36,15 @@ const requestListener = function (req, res) { res.end(data); }); }else if (req.url === "/"){ - //template stuff - res.writeHead(200) - res.end("N/A") + fs.readFile("templates/start.html", function (err,data) { + if (err) { + res.writeHead(203); + res.end("
internal error"+JSON.stringify(err)); + return; + } + res.writeHead(200); + res.end(data); + }); }else if(req.url.includes("/../")) { fs.readFile("templates/500.html", function (err,data) { if (err) { diff --git a/static/404.css b/static/404.css new file mode 100644 index 0000000..677f9a5 --- /dev/null +++ b/static/404.css @@ -0,0 +1,12 @@ +body { + font-size: 80px; + font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + align-items: center; + background-color: black; + color: white; + align-items: center; + } +p { + vertical-align: middle; + text-align: center; +} \ No newline at end of file diff --git a/static/500.html b/static/500.html new file mode 100644 index 0000000..eb86703 --- /dev/null +++ b/static/500.html @@ -0,0 +1,12 @@ + + + ++ 500 Bad Request +
+ + + + + + \ No newline at end of file diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..dc782b7 --- /dev/null +++ b/static/style.css @@ -0,0 +1,3 @@ +nav { + +} \ No newline at end of file diff --git a/static/test2.html b/static/test2.html new file mode 100644 index 0000000..78933be --- /dev/null +++ b/static/test2.html @@ -0,0 +1,8 @@ +Posted by John Doe
+Some additional information here
+Lorem Ipsum dolor set amet....
+404
+Unexisting things cannot be found
+ \ No newline at end of file diff --git a/templates/500.html b/templates/500.html index 78c5b52..eb86703 100644 --- a/templates/500.html +++ b/templates/500.html @@ -1,10 +1,12 @@ + -+ 500 Bad Request +
+ + + + \ No newline at end of file diff --git a/templates/rick.html b/templates/rick.html index 394802b..b5b6778 100644 --- a/templates/rick.html +++ b/templates/rick.html @@ -1,5 +1,6 @@ +