Spaces:
Running
Running
Update app.js
Browse files
app.js
CHANGED
@@ -83,3 +83,22 @@ app.get("/api-checker", (req, res) => {
|
|
83 |
app.listen(port, () => {
|
84 |
console.log("listening on localhost:", port);
|
85 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
app.listen(port, () => {
|
84 |
console.log("listening on localhost:", port);
|
85 |
})
|
86 |
+
|
87 |
+
|
88 |
+
function formatDate(date) {
|
89 |
+
const YYYY = String(date.getFullYear());
|
90 |
+
const MM = String(date.getMonth() + 1).padStart(2, "0");
|
91 |
+
const DD = String(date.getDate()).padStart(2, "0");
|
92 |
+
const hh = String(date.getHours()).padStart(2, "0");
|
93 |
+
const mm = String(date.getMinutes()).padStart(2, "0");
|
94 |
+
const ss = String(date.getSeconds()).padStart(2, "0");
|
95 |
+
|
96 |
+
return {
|
97 |
+
YYYY,
|
98 |
+
MM,
|
99 |
+
DD,
|
100 |
+
hh,
|
101 |
+
mm,
|
102 |
+
ss
|
103 |
+
}
|
104 |
+
}
|