aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-04-16 23:05:12 +0200
committerHampusM <hampus@hampusmat.com>2021-04-16 23:05:12 +0200
commit0b41f38661d4ce3f90ad4df7cc5a17efae8352aa (patch)
treedefc5d71613985381dcd03eec081b6eb7b0629ca /app.js
parentef256e9e40b5fd0cc741c509e611808cc66bafad (diff)
Added basic backend code, two api endpoints & sanitization
Diffstat (limited to 'app.js')
-rw-r--r--app.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/app.js b/app.js
index 48ae694..9870050 100644
--- a/app.js
+++ b/app.js
@@ -1,3 +1,12 @@
const express = require("express");
+const api = require("./api/v1");
+const differenceInDays = require('date-fns/differenceInDays')
+const now = new Date();
+const commit = new Date(1611497751 * 1000);
+console.log(now);
+console.log(commit)
+console.log(differenceInDays(now, commit));
const app = express();
+app.use("/api/v1", api);
+app.listen(1337); \ No newline at end of file