mirror of
https://github.com/System-End/ip.git
synced 2026-04-19 16:28:23 +00:00
Add index route
This commit is contained in:
parent
db17234b82
commit
c605b83d77
1 changed files with 2 additions and 0 deletions
2
index.ts
2
index.ts
|
|
@ -1,4 +1,5 @@
|
|||
import { sql } from "bun";
|
||||
import index from "./index.html";
|
||||
|
||||
async function q(ip: string) {
|
||||
return await sql`
|
||||
|
|
@ -38,6 +39,7 @@ async function q(ip: string) {
|
|||
|
||||
Bun.serve({
|
||||
routes: {
|
||||
"/": index,
|
||||
"/ip": async (req, server) => {
|
||||
const start = performance.now()
|
||||
const ip = req.headers.get("x-real-ip")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue