rsnext/examples/with-turbopack/lib/getBaseUrl.ts
Maia Teegarden e5eab8b38d
update with-turbopack example (#49332)
Updated to latest app-playground code
2023-05-18 17:33:02 +00:00

7 lines
184 B
TypeScript

import { cache } from 'react'
export const getBaseUrl = cache(() =>
process.env.VERCEL_URL
? `https://app-dir.vercel.app`
: `http://localhost:${process.env.PORT ?? 3000}`
)