diff options
author | amelia <[email protected]> | 2022-06-18 21:54:19 -0500 |
---|---|---|
committer | amelia <[email protected]> | 2022-06-18 21:54:19 -0500 |
commit | b7e7dece4b6a85b242bc87ddd005ce12d484f7a5 (patch) | |
tree | 877ad736777de6b0eb9a235f929e9cd03e91d9b3 /index.js | |
parent | 25c18c481666857a3123e08db0bdc541b6cb88b8 (diff) |
switched to ts, and html updates
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 23 |
1 files changed, 0 insertions, 23 deletions
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 |