Skip to content

Commit

Permalink
restores api .env and adds jina api key check.
Browse files Browse the repository at this point in the history
  • Loading branch information
bLopata committed Nov 18, 2024
1 parent 116c70a commit 8f0fc70
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
19 changes: 19 additions & 0 deletions api/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# OpenAI/Openrouter Keys
OPENAI_API_KEY=
MODEL=

# NextJS & fastAPI
URL=http://localhost:3000
HONCHO_URL=https://demo.honcho.dev
HONCHO_APP_NAME=

# Sentry
SENTRY_DSN_API=
SENTRY_ENVIORNMENT=

# Supabase
SUPABASE_URL=<Supabase Project URL>
SUPABASE_KEY=<Supabase Service Key

# Stripe
STRIPE_ENABLED=
5 changes: 4 additions & 1 deletion www/app/r/[...url]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export default async function Page({
if (params.url.length < 2) {
throw Error("Page not found");
}

// Check for JINA API key
if (!process.env.NEXT_PUBLIC_JINA_API_KEY) {
throw new Error("JINA API key is not configured");
}
// Reconstruct the full URL from parts
// Protocol comes as first parameter with encoded colon (e.g., "https%3A")
const protocol = params.url[0].replace(/%3A/g, ':');
Expand Down

0 comments on commit 8f0fc70

Please sign in to comment.