diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..c0d66521 --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +NODE_ENV=development diff --git a/src/lib/env.ts b/src/lib/env.ts index 95d11547..940bb949 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -1,10 +1,10 @@ export const ENV = { - OS_RAISE_CONTENT_URL_PREFIX: import.meta.env.PROD ? 'https://k12.openstax.org/contents/raise' : 'http://localhost:8800/contents', + OS_RAISE_CONTENT_URL_PREFIX: import.meta.env.MODE === 'production' ? 'https://k12.openstax.org/contents/raise' : 'http://localhost:8800/contents', OS_RAISE_EVENTSAPI_URL_MAP: {}, EVENT_FLUSH_PERIOD: 60000 } -if (import.meta.env.PROD) { +if (import.meta.env.MODE === 'production') { ENV.OS_RAISE_EVENTSAPI_URL_MAP = { 'raiselearning.org': 'https://events.raiselearning.org', 'staging.raiselearning.org': 'https://events.staging.raiselearning.org'