diff --git a/client/src/config.ts b/client/src/config.ts index 7ee0434..64c07b5 100644 --- a/client/src/config.ts +++ b/client/src/config.ts @@ -1,11 +1,10 @@ -export const ENV = - window.location.hostname === 'todo: change to prod domain' +export const ENV = window.location.hostname.includes('stage.') + ? 'stage' + : window.location.hostname === 'todo: change to prod domain' ? 'prod' - : window.location.hostname.includes('todo: change to non prod matcher') - ? 'stage' - : window.location.port === '4173' - ? 'test' - : 'dev'; + : window.location.port === '4173' + ? 'test' + : 'dev'; export const getServerUrl = () => { switch (ENV) { diff --git a/package.json b/package.json index c5fe005..4b86ba6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "create-react-spa-cloudflare", "type": "module", - "version": "0.0.22", + "version": "0.0.23", "description": "Starter package for a React SPA with Cloudflare Pages, Workers, and KV", "bin": "./bin/cli.js", "scripts": {