aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/get.ts2
-rw-r--r--src/index.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/get.ts b/src/get.ts
index d31fb4b..fb853a3 100644
--- a/src/get.ts
+++ b/src/get.ts
@@ -57,7 +57,7 @@ export async function get_id(
const res = new Response(html, { status: 301 });
res.headers.set("Location", url.href);
- res.headers.set("Cache-Control", "max-age=3");
+ res.headers.set("Cache-Control", "max-age=120");
res.headers.set("Content-Type", "text/html");
if (context.headers["user-agent"] ?? "".includes("curl")) {
diff --git a/src/index.ts b/src/index.ts
index 4d0821c..9a481e6 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -4,7 +4,7 @@ import postgres from "postgres";
import { get_home, get_id, get_create } from "./get";
import { post_c } from "./post";
-const sql = postgres();
+const sql = postgres(`postgres://postgres:password@localhost:5432/postgres`);
const app = new Elysia()
.get("/", ({ headers }) => get_home({ headers: headers }))