switched to ts, and html updates

This commit is contained in:
grant-kun 2022-06-18 21:54:19 -05:00
parent 3413272ac0
commit f36ec4127f
3 changed files with 25 additions and 33 deletions

View File

@ -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');

View File

@ -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 })
})
});

14
server.ts Normal file
View File

@ -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 })
})})