From 852f1405d30e7aa3dbc85947e9925fab0e26c4b0 Mon Sep 17 00:00:00 2001 From: veryCrunchy Date: Tue, 2 Apr 2024 22:07:36 +0200 Subject: [PATCH] chore: github env vars --- .env.example | 4 ++++ package.json | 2 +- src/main.ts | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 5a0531b..f150cc2 100644 --- a/.env.example +++ b/.env.example @@ -10,6 +10,10 @@ CALLBACK_URL="https://beta.greasygang.co/auth/callback" DB_NAME="" #ENV_VARS +BASE_URL="http://localhost:4000" +CALLBACK_URL="http://localhost:3000/auth/callback" +DB_NAME="" + DB_HOST="localhost" DB_USER="" DB_PASS="" diff --git a/package.json b/package.json index bb2ffd3..77320bf 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "dev": "cross-env NODE_ENV=development tsx watch src/main.ts --host 127.0.0.1", + "dev": "cross-env NODE_ENV=development tsx watch src/main.ts", "start": "tsx src/main.ts", "generate": "drizzle-kit generate:mysql", "pull": "drizzle-kit introspect:mysql", diff --git a/src/main.ts b/src/main.ts index 524df86..320e0ce 100644 --- a/src/main.ts +++ b/src/main.ts @@ -55,6 +55,9 @@ try { "JWT_SECRET", "CALLBACK_URL", "BASE_URL", + "GITHUB_TOKEN", + "GITHUB_OWNER", + "GITHUB_REPO", "TWITCH_CLIENT_ID", "TWITCH_CLIENT_SECRET", "DISCORD_CLIENT_ID", @@ -105,8 +108,7 @@ app.get("/image/:imagePath(*)", async (req, res) => { res.setHeader("Content-Type", "image/png"); res.send(data); } catch (error) { - console.error("Error fetching image:", error); - res.status(500).send("Internal Server Error"); + res.status(404); } });