diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 +}); |