Skip to content

Commit

Permalink
fix(dashboard): Ensure that dashboard works in local on checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
SokratisVidros committed Nov 18, 2024
1 parent 96c2829 commit 5885e7e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions apps/api/src/.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ NODE_ENV=local
PORT=3000
API_ROOT_URL=http://127.0.0.1:3000
FRONT_BASE_URL=http://127.0.0.1:4200
DASHBOARD_V2_BASE_URL=http://127.0.0.1:4201
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false

Expand Down
24 changes: 14 additions & 10 deletions apps/api/src/config/env.validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,35 @@ export const envValidators = {
MONGO_URL: str(),
NOVU_API_KEY: str({ default: '' }),
STORE_ENCRYPTION_KEY: str(),
NEW_RELIC_APP_NAME: str({ default: '' }),
NEW_RELIC_LICENSE_KEY: str({ default: '' }),
REDIS_CACHE_SERVICE_HOST: str({ default: '' }),
REDIS_CACHE_SERVICE_PORT: str({ default: '' }),
REDIS_CACHE_SERVICE_TLS: json({ default: undefined }),
REDIS_CLUSTER_SERVICE_HOST: str({ default: '' }),
REDIS_CLUSTER_SERVICE_PORTS: str({ default: '' }),
STORE_NOTIFICATION_CONTENT: bool({ default: false }),
LAUNCH_DARKLY_SDK_KEY: str({ default: '' }),
WORKER_DEFAULT_CONCURRENCY: num({ default: undefined }),
WORKER_DEFAULT_LOCK_DURATION: num({ default: undefined }),
STRIPE_API_KEY: str({ default: undefined }),
STRIPE_CONNECT_SECRET: str({ default: undefined }),
ENABLE_OTEL: bool({ default: false }),
NOTIFICATION_RETENTION_DAYS: num({ default: DEFAULT_NOTIFICATION_RETENTION_DAYS }),
MESSAGE_GENERIC_RETENTION_DAYS: num({ default: DEFAULT_MESSAGE_GENERIC_RETENTION_DAYS }),
MESSAGE_IN_APP_RETENTION_DAYS: num({ default: DEFAULT_MESSAGE_IN_APP_RETENTION_DAYS }),
LEGACY_STAGING_DASHBOARD_URL: url({ default: undefined }),
API_ROOT_URL: url(),
NOVU_INVITE_TEAM_MEMBER_NUDGE_TRIGGER_IDENTIFIER: str({ default: undefined }),
HUBSPOT_INVITE_NUDGE_EMAIL_USER_LIST_ID: str({ default: undefined }),
HUBSPOT_PRIVATE_APP_ACCESS_TOKEN: str({ default: undefined }),
...(processEnv.NOVU_ENTERPRISE === 'true' && {
PLAIN_SUPPORT_KEY: str(),
}),

// Novu Cloud third party services
...(processEnv.IS_SELF_HOSTED !== 'true' &&
processEnv.NOVU_ENTERPRISE === 'true' && {
HUBSPOT_INVITE_NUDGE_EMAIL_USER_LIST_ID: str({ default: undefined }),
HUBSPOT_PRIVATE_APP_ACCESS_TOKEN: str({ default: undefined }),
LAUNCH_DARKLY_SDK_KEY: str({ default: '' }),
NEW_RELIC_APP_NAME: str({ default: '' }),
NEW_RELIC_LICENSE_KEY: str({ default: '' }),
PLAIN_SUPPORT_KEY: str({ default: undefined }),
STRIPE_API_KEY: str({ default: undefined }),
STRIPE_CONNECT_SECRET: str({ default: undefined }),
}),

// Feature Flags
...Object.keys(FeatureFlagsKeysEnum).reduce(
(acc, key) => {
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default defineConfig({
},
},
server: {
port: 4201,
headers: {
'Document-Policy': 'js-profiling',
},
Expand Down

0 comments on commit 5885e7e

Please sign in to comment.