detect undefined env vars
This commit is contained in:
parent
54991cd386
commit
09ffd5588c
|
@ -1,8 +1,10 @@
|
|||
Monorepo. pnpm required for workspaces.
|
||||
git monorepo.
|
||||
|
||||
packages/strapi requires Yarn.
|
||||
pnpm required for workspaces.
|
||||
|
||||
Development uses dockerfile with dotenv.
|
||||
Yarn required for packages/strapi
|
||||
|
||||
Development uses docker compose with dotenv.
|
||||
|
||||
Production uses dokku.
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
// export const strapiUrl = (process.env.NODE_ENV === 'production') ? 'https://portal.futureporn.net' : 'https://chisel.sbtp:1337'
|
||||
// export const siteUrl = (process.env.NODE_ENV === 'production') ? 'https://futureporn.net' : 'http://localhost:3000'
|
||||
if (!process.env.NEXT_PUBLIC_SITE_URL) throw new Error('NEXT_PUBLIC_SITE_URL was missing in env');
|
||||
if (!process.env.NEXT_PUBLIC_STRAPI_URL) throw new Error('NEXT_PUBLIC_STRAPI_URL was missing in env');
|
||||
if (!process.env.NEXT_PUBLIC_UPPY_COMPANION_URL) throw new Error('NEXT_PUBLIC_UPPY_COMPANION_URL undefined in env');
|
||||
|
||||
export const companionUrl = process.env.NEXT_PUBLIC_UPPY_COMPANION_URL
|
||||
export const siteUrl = ''+process.env.NEXT_PUBLIC_SITE_URL
|
||||
export const strapiUrl = ''+process.env.NEXT_PUBLIC_STRAPI_URL
|
||||
export const patreonSupporterBenefitId: string = '4760169'
|
||||
|
|
|
@ -5,8 +5,8 @@ import Uppy from '@uppy/core';
|
|||
import AwsS3 from '@uppy/aws-s3';
|
||||
import RemoteSources from '@uppy/remote-sources';
|
||||
import { useAuth } from './components/auth';
|
||||
import { companionUrl } from '@/lib/constants';
|
||||
|
||||
const companionUrl = process.env.NEXT_PUBLIC_UPPY_COMPANION_URL!
|
||||
|
||||
export const UppyContext = createContext(new Uppy());
|
||||
|
||||
|
|
Loading…
Reference in New Issue