aboutsummaryrefslogtreecommitdiff
path: root/server.ts
diff options
context:
space:
mode:
authoramelia <[email protected]>2022-06-23 18:25:56 -0500
committeramelia <[email protected]>2022-06-23 18:25:56 -0500
commit7cb21e8d6d8d17d130543b2bea82341888867232 (patch)
treec0f10098653fabab051ea7654a495e7b1aaff637 /server.ts
parent4b36068d2cbc5b07815affb3b62e040cebee118e (diff)
scheduled (not really) updateHEADmain
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/server.ts b/server.ts
index 05807cd..14fa79c 100644
--- a/server.ts
+++ b/server.ts
@@ -1,14 +1,12 @@
-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) {
+const PORT = 8008;
app.listen(PORT, function () {
- console.log('listening! http://localhost:' + PORT);
+ console.log('listening! http://localhost:' + PORT + ' | http://' + require("ip").address() + ':' + 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
+});