add url helper

This commit is contained in:
Thomas Ruoff
2020-09-16 23:36:11 +02:00
committed by Thomas Ruoff
parent 56c8263e90
commit cd5fa56807
2 changed files with 10 additions and 1 deletions

7
helpers/url.ts Normal file
View File

@@ -0,0 +1,7 @@
const URL = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: 'http://localhost:3000'
export function getBaseURL(): string {
return URL
}