mirror of
https://github.com/YuzuZensai/Test-IP.git
synced 2026-07-21 15:19:28 +00:00
🐛 fix: remove export default causing false EADDRINUSE in Docker
This commit is contained in:
+2
-4
@@ -1,6 +1,6 @@
|
|||||||
import { Elysia } from "elysia";
|
import { Elysia } from "elysia";
|
||||||
|
|
||||||
const app = new Elysia()
|
new Elysia()
|
||||||
.get("/", ({ server, request }) => {
|
.get("/", ({ server, request }) => {
|
||||||
const ip = server?.requestIP(request);
|
const ip = server?.requestIP(request);
|
||||||
const ipStr = ip ? (typeof ip === "object" ? ip.address : ip) : "unknown";
|
const ipStr = ip ? (typeof ip === "object" ? ip.address : ip) : "unknown";
|
||||||
@@ -26,8 +26,6 @@ const app = new Elysia()
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
})
|
})
|
||||||
.listen({ port: 3000, hostname: "0.0.0.0" });
|
.listen(3000);
|
||||||
|
|
||||||
console.log("Listening on port 3000");
|
console.log("Listening on port 3000");
|
||||||
|
|
||||||
export default app;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user