Skip to content

Commit

Permalink
NEXT_RUNTIME moved to env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnmclean committed Nov 27, 2024
1 parent 0875c52 commit 462d096
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/sovoli.com/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const env = createEnv({
server: {
POSTGRES_URL: z.string().url(),
TRIGGER_SECRET_KEY: z.string(),
NEXT_RUNTIME: z.enum(["nodejs", "edge"]),
},

/**
Expand Down
4 changes: 3 additions & 1 deletion apps/sovoli.com/src/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { env } from "./env";

export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
if (env.NEXT_RUNTIME === "nodejs") {
console.log("instrumentation registering");
await import("./instrumentation.node");
}
Expand Down
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"SUPABASE_ANON_KEY",
"ISBN_DB_API_KEY",
"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT",
"OTEL_EXPORTER_OTLP_HEADERS"
"OTEL_EXPORTER_OTLP_HEADERS",
"NEXT_RUNTIME"
],
"ui": "tui"
}

0 comments on commit 462d096

Please sign in to comment.