mirror of https://github.com/TZGyn/shortener
added shortener url env
parent
172f65d8f1
commit
b351f7fb33
@ -1,3 +1,4 @@
|
||||
PROTOCOL_HEADER=x-forwarded-proto
|
||||
HOST_HEADER=x-forwarded-host
|
||||
DATABASE_URL=postgres://postgres:password@127.0.0.1:5432/link-shortener
|
||||
DATABASE_URL=postgres://postgres:password@127.0.0.1:5432/link-shortener
|
||||
PUBLIC_SHORTENER_URL=http://localhost:3000
|
||||
@ -1,10 +1,11 @@
|
||||
import type { LayoutServerLoad } from './$types'
|
||||
import { PUBLIC_SHORTENER_URL } from '$env/static/public'
|
||||
|
||||
export const load = (async (event) => {
|
||||
const user = event.locals.userObject
|
||||
|
||||
return {
|
||||
shortener_url: process.env.SHORTENER_URL ?? 's.tzgyn.com',
|
||||
shortener_url: PUBLIC_SHORTENER_URL,
|
||||
user: user,
|
||||
}
|
||||
}) satisfies LayoutServerLoad
|
||||
|
||||
Loading…
Reference in New Issue