From b7e7dece4b6a85b242bc87ddd005ce12d484f7a5 Mon Sep 17 00:00:00 2001 From: amelia Date: Sat, 18 Jun 2022 21:54:19 -0500 Subject: switched to ts, and html updates --- index.js | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 index.js (limited to 'index.js') 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 -- cgit v1.2.3