chore(debug): envs in edge functions
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
import "dotenv/config"
|
||||
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import type { NextRequest } from "next/server"
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const e = process.env
|
||||
console.log({ process_env: process.env })
|
||||
|
||||
const urlVar = "PUBLC_URL"
|
||||
const nextAuthUrlVar = "NEXTAUTH_URL"
|
||||
const nextAuthUrlVar2 = "AUTH_URL"
|
||||
const envTestVar = "ENVTEST"
|
||||
|
||||
const values = {
|
||||
env_url: env.PUBLIC_URL,
|
||||
static_url: process.env.PUBLIC_URL,
|
||||
dynamic_url: e[urlVar],
|
||||
env_envtest: env.ENVTEST,
|
||||
static_envtest: process.env.ENVTEST,
|
||||
dynamic_envtest: e[envTestVar],
|
||||
env_nextauth: env.NEXTAUTH_URL,
|
||||
static_nextauth: process.env.NEXTAUTH_URL,
|
||||
dynamic_nextauth: e[nextAuthUrlVar],
|
||||
env_nextauth2: env.AUTH_URL,
|
||||
static_nextauth2: process.env.AUTH_URL,
|
||||
dynamic_nextauth2: e[nextAuthUrlVar2],
|
||||
}
|
||||
|
||||
console.log(values)
|
||||
|
||||
return NextResponse.json(values)
|
||||
}
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
export const runtime = "edge"
|
||||
@@ -1,41 +0,0 @@
|
||||
import { config } from "dotenv"
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import type { NextRequest } from "next/server"
|
||||
|
||||
config({ path: "./.env" })
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const e = process.env
|
||||
console.log({ process_env: process.env })
|
||||
|
||||
const urlVar = "PUBLIC_URL"
|
||||
const nextAuthUrlVar = "NEXTAUTH_URL"
|
||||
const nextAuthUrlVar2 = "AUTH_URL"
|
||||
const envTestVar = "ENVTEST"
|
||||
|
||||
const values = {
|
||||
env_url: env.PUBLIC_URL,
|
||||
static_url: process.env.PUBLIC_URL,
|
||||
dynamic_url: e[urlVar],
|
||||
env_envtest: env.ENVTEST,
|
||||
static_envtest: process.env.ENVTEST,
|
||||
dynamic_envtest: e[envTestVar],
|
||||
env_nextauth: env.NEXTAUTH_URL,
|
||||
static_nextauth: process.env.NEXTAUTH_URL,
|
||||
dynamic_nextauth: e[nextAuthUrlVar],
|
||||
env_nextauth2: env.AUTH_URL,
|
||||
static_nextauth2: process.env.AUTH_URL,
|
||||
dynamic_nextauth2: e[nextAuthUrlVar2],
|
||||
}
|
||||
|
||||
console.log(values)
|
||||
|
||||
return NextResponse.json(values)
|
||||
}
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
export const runtime = "edge"
|
||||
@@ -1,41 +0,0 @@
|
||||
import { config } from "dotenv"
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import type { NextRequest } from "next/server"
|
||||
|
||||
config({ debug: true, override: true })
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const e = process.env
|
||||
console.log({ process_env: process.env })
|
||||
|
||||
const urlVar = "PUBLC_URL"
|
||||
const nextAuthUrlVar = "NEXTAUTH_URL"
|
||||
const nextAuthUrlVar2 = "AUTH_URL"
|
||||
const envTestVar = "ENVTEST"
|
||||
|
||||
const values = {
|
||||
env_url: env.PUBLIC_URL,
|
||||
static_url: process.env.PUBLIC_URL,
|
||||
dynamic_url: e[urlVar],
|
||||
env_envtest: env.ENVTEST,
|
||||
static_envtest: process.env.ENVTEST,
|
||||
dynamic_envtest: e[envTestVar],
|
||||
env_nextauth: env.NEXTAUTH_URL,
|
||||
static_nextauth: process.env.NEXTAUTH_URL,
|
||||
dynamic_nextauth: e[nextAuthUrlVar],
|
||||
env_nextauth2: env.AUTH_URL,
|
||||
static_nextauth2: process.env.AUTH_URL,
|
||||
dynamic_nextauth2: e[nextAuthUrlVar2],
|
||||
}
|
||||
|
||||
console.log(values)
|
||||
|
||||
return NextResponse.json(values)
|
||||
}
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
export const runtime = "edge"
|
||||
Reference in New Issue
Block a user