diff options
-rw-r--r-- | index.html | 21 | ||||
-rw-r--r-- | index.js | 23 | ||||
-rw-r--r-- | server.ts | 14 |
3 files changed, 25 insertions, 33 deletions
@@ -20,7 +20,7 @@ transform:scale(0.7); <script> //set background to dark grey - var BgColor = '#222222'; + var BgColor = '#dddddd'; document.body.style.backgroundColor = BgColor; let ranks = { 1:"poor", @@ -381,17 +381,18 @@ transform:scale(0.7); setFavicon.setAttribute('rel','shortcut icon'); setFavicon.setAttribute('href',favImg); headTitle.appendChild(setFavicon); + console.log("favicon set") } document.write("<div style='position:absolute;bottom:0%;right:0%;transform:scale(0.6);'><tt>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>_______________________</div>.-'~~~-.</br>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>_____________________</div>.'o oOOOo`.</br>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>____________________</div>:~~~-.oOo o`.</br>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>______________________</div>`. \ ~-. oOOo.</br>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>_______________________</div>`.; / ~. OO:</br>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>_______________________</div>.' ;-- `.o.'</br>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>______________________</div>,' ; ~~--'~</br>\ -<div style='display:inline;color:rgba(0, 0, 0, 0);'>______________________</div>; ;</br>\ -_______\|/__________\\;_\\//___\|/________ </tt></div>") +<div style='display:inline;color:rgba(0, 0, 0, 0);'>_______________________</div><div style='display:inline;color:red;'>.-'~~~-.</div></br>\ +<div style='display:inline;color:rgba(0, 0, 0, 0);'>_____________________</div><div style='display:inline;color:red;'>.'o oOOOo`.</div></br>\ +<div style='display:inline;color:rgba(0, 0, 0, 0);'>____________________</div><div style='display:inline;color:red;'>:~~~-.oOo o`.</div></br>\ +<div style='display:inline;color:rgba(0, 0, 0, 0);'>______________________</div><div style='display:inline;color:red;'>`. </div>\ <div style='display:inline;color:red;'>~-. oOOo.</div></br>\ +<div style='display:inline;color:rgba(0, 0, 0, 0);'>_______________________</div><div style='display:inline;color:red;'>`.</div><div style='display:inline;color:#964B00;'>; / </div><div style='display:inline;color:red;'>~. OO:</div></br>\ +<div style='display:inline;color:rgba(0, 0, 0, 0);'>_______________________</div><div style='display:inline;color:#964B00;'>.' ;</div><div style='display:inline;color:red;'>-- `.o.'</div></br>\ +<div style='display:inline;color:rgba(0, 0, 0, 0);'>______________________</div><div style='display:inline;color:#964B00;'>,' ;</div><div style='display:inline;color:red;'> ~~--'~</div></br>\ +<div style='display:inline;color:rgba(0, 0, 0, 0);'>______________________</div><div style='display:inline;color:#964B00;'>'; ;</div></br>\ +<div style='display:inline;color:green;'>_______\|/__________\\;_\\//___\|/________ </div></tt></div>") setFavicons('https://raw.githubusercontent.com/squiresgrant/Antheia/main/icon.ico'); var bank = getCookie('bank'); diff --git a/index.js b/index.js deleted file mode 100644 index e64fb0b..0000000 --- a/index.js +++ /dev/null @@ -1,23 +0,0 @@ - -var fs = require('fs'); -//express -var express = require('express'); -var app = express(); -//this dir -var dir = __dirname; -const PORT=3000; -let t = dir + './crates.json' -fs.readFile('./index.html', function (err, html) { -//listen -app.listen(PORT, function () { - console.log('listening on port ' + PORT); -}); -//on request serve index.html -app.get('/', function (req, res) { - res.sendFile('index.html', {root: __dirname }) -}) -app.get('/crates.json', function (req, res) { - res.sendFile('crates.json', {root: __dirname }) -}) - -});
\ No newline at end of file diff --git a/server.ts b/server.ts new file mode 100644 index 0000000..4907371 --- /dev/null +++ b/server.ts @@ -0,0 +1,14 @@ +var fs = require('fs'); +var express = require('express'); +var app = express(); +const PORT = 8008 || process.env.PORT;; +fs.readFile('./index.html', function (err:any, html:any) { +app.listen(PORT, function () { + console.log('listening! http://localhost:' + PORT); +}); +app.get('/', function (req:any, res:any) { + res.sendFile('index.html', {root: __dirname }) +}) +app.get('/crates.json', function (req:any, res:any) { + res.sendFile('crates.json', {root: __dirname }) +})})
\ No newline at end of file |