mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
fix: require VITE_CONVEX_URL env var for edge functions and clarify publishing workflow
- Add VITE_CONVEX_URL requirement to Netlify env vars for edge function runtime - Improve error messages in edge functions when Convex URL is missing - Add "How publishing works" explanation to README, setup guide, and docs - Update deployment instructions across all documentation
This commit is contained in:
@@ -10,11 +10,11 @@ export default async function handler(
|
||||
|
||||
if (!convexUrl) {
|
||||
return new Response(
|
||||
JSON.stringify({ error: "Configuration error: Missing Convex URL" }),
|
||||
{
|
||||
status: 500,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
},
|
||||
JSON.stringify({
|
||||
error:
|
||||
"VITE_CONVEX_URL not set. Add it to Netlify environment variables.",
|
||||
}),
|
||||
{ status: 500, headers: { "Content-Type": "application/json" } },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ export default async function handler(
|
||||
Deno.env.get("VITE_CONVEX_URL") || Deno.env.get("CONVEX_URL");
|
||||
|
||||
if (!convexUrl) {
|
||||
return new Response("Configuration error: Missing Convex URL", {
|
||||
status: 500,
|
||||
});
|
||||
return new Response(
|
||||
"Configuration error: VITE_CONVEX_URL not set. Add it to Netlify environment variables.",
|
||||
{ status: 500, headers: { "Content-Type": "text/plain" } },
|
||||
);
|
||||
}
|
||||
|
||||
// Construct the Convex site URL for the HTTP endpoint
|
||||
|
||||
@@ -9,9 +9,10 @@ export default async function handler(
|
||||
Deno.env.get("VITE_CONVEX_URL") || Deno.env.get("CONVEX_URL");
|
||||
|
||||
if (!convexUrl) {
|
||||
return new Response("Configuration error: Missing Convex URL", {
|
||||
status: 500,
|
||||
});
|
||||
return new Response(
|
||||
"Configuration error: VITE_CONVEX_URL not set. Add it to Netlify environment variables.",
|
||||
{ status: 500, headers: { "Content-Type": "text/plain" } },
|
||||
);
|
||||
}
|
||||
|
||||
// Construct the Convex site URL for the HTTP endpoint
|
||||
|
||||
Reference in New Issue
Block a user