""refactor"" basically everything

This commit is contained in:
Enstrayed
2024-09-22 14:04:15 -07:00
parent 2e527a8539
commit 5f1181476d
14 changed files with 78 additions and 90 deletions

View File

@@ -1,4 +1,4 @@
const { app } = require("../index.js")
import { app } from "../index.js"
app.get("/api/ip", (rreq,rres) => {
let jsonResponse = {
@@ -6,7 +6,6 @@ app.get("/api/ip", (rreq,rres) => {
"Country": rreq.get("cf-ipcountry") || "not_cloudflare",
"CfRay": rreq.get("cf-ray") || "not_cloudflare"
}
rres.send(jsonResponse)
})
@@ -14,4 +13,4 @@ app.get("/api/headers", (rreq,rres) => {
rres.send(rreq.headers)
})
module.exports = {app}
export { app }