Skip to content

Commit

Permalink
more config
Browse files Browse the repository at this point in the history
  • Loading branch information
JClackett committed Apr 13, 2023
1 parent 8de3048 commit 88fe1ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apps/app/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function getEnvironment() {
} else {
return {
ENV: "production",
WEB_URL: "https://boilerplate.app",
WEB_URL: "https://boilerplate-remix-expo.noquarter.co",
}
}
}
Expand All @@ -21,5 +21,5 @@ export const VERSION = Application.nativeApplicationVersion
export const ENV = environment.ENV

export const IS_DEV = ENV === "development"
export const IS_STAGING = ENV === "staging"
export const IS_PREVIEW = ENV === "preview"
export const IS_PRODUCTION = ENV === "production"
14 changes: 7 additions & 7 deletions apps/web/app/lib/config.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ import { z } from "zod"

// Only use on the server
const envSchema = z.object({
NODE_ENV: z.enum(["development", "production", "test"]),
APP_ENV: z.enum(["development", "production", "test"]),
NODE_ENV: z.enum(["development", "production"]),
VERCEL_ENV: z.enum(["development", "production", "preview"]),
VERCEL_URL: z.string().optional(),
APP_SECRET: z.string(),
SESSION_SECRET: z.string(),
RESEND_API_KEY: z.string(),
FLASH_SESSION_SECRET: z.string(),
THEME_SESSION_SECRET: z.string(),
WEB_URL: z.string(),
AWS_ACCESS_KEY_USER: z.string(),
AWS_SECRET_KEY_USER: z.string(),
})

export const {
NODE_ENV,
APP_ENV,
VERCEL_ENV,
APP_SECRET,
SESSION_SECRET,
RESEND_API_KEY,
FLASH_SESSION_SECRET,
THEME_SESSION_SECRET,
WEB_URL,
VERCEL_URL,
AWS_ACCESS_KEY_USER,
AWS_SECRET_KEY_USER,
} = envSchema.parse(process.env)

export const IS_PRODUCTION = APP_ENV === "production"
export const IS_PRODUCTION = VERCEL_ENV === "production"
// WEB URL
export const FULL_WEB_URL = `${APP_ENV !== "development" ? "https://" : "http://"}${WEB_URL}`
export const FULL_WEB_URL = !VERCEL_URL ? "http://localhost:3000" : `https://${VERCEL_URL}`

0 comments on commit 88fe1ae

Please sign in to comment.