diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index fc3285df..85e1c1b9 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -6,7 +6,7 @@ "scripts": { "check:types": "svelte-check", "preview": "npx http-server@latest ../../dist/dashboard -P \"http://localhost:8080?\"", - "dev": "vite dev --force --host=0.0.0.0 --port=5174", + "dev": "vite dev", "build": "NODE_ENV=production vite build", "lint": "prettier --check .", "format": "prettier --write ." diff --git a/packages/dashboard/src/env.ts b/packages/dashboard/src/env.ts index f5fb98bd..a4a637b2 100644 --- a/packages/dashboard/src/env.ts +++ b/packages/dashboard/src/env.ts @@ -9,7 +9,7 @@ import { InstanceFields } from 'pockethost/common' // The apex domain of this whole operation. export const PUBLIC_APEX_DOMAIN = - import.meta.env.PUBLIC_APEX_DOMAIN || `pockethost.lvh.me` + import.meta.env.PUBLIC_APEX_DOMAIN || `pockethost.io` // The domain name where this dashboard lives export const PUBLIC_APP_URL = diff --git a/packages/dashboard/src/services.ts b/packages/dashboard/src/services.ts deleted file mode 100644 index 7c60bd4b..00000000 --- a/packages/dashboard/src/services.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { LoggerService, LogLevelName } from 'pockethost/common' -import { PUBLIC_DEBUG } from './env' - -// Initiate the logging service -// TODO: Document this -try { - LoggerService() -} catch { - LoggerService({ - level: PUBLIC_DEBUG ? LogLevelName.Debug : LogLevelName.Info, - }) -} diff --git a/packages/dashboard/src/util/stores.ts b/packages/dashboard/src/util/stores.ts index 50585daa..e1d2649e 100644 --- a/packages/dashboard/src/util/stores.ts +++ b/packages/dashboard/src/util/stores.ts @@ -1,19 +1,23 @@ +import { PUBLIC_DEBUG } from '$src/env' import { client } from '$src/pocketbase-client' -import consoleLogger from '@pockethost/plugin-console-logger' import { + ConsoleLogger, + LogLevelName, SubscriptionType, UserFields, - loadPlugins, + ioc, type InstanceFields, type InstanceId, type UnsubscribeFunc, } from 'pockethost/common' import { writable } from 'svelte/store' -// TODO: Removing this will cause the app to crash -// Theres a reference inside of `createPocketbaseClient.ts` that needs the information that comes from this file -import '../services' -loadPlugins([consoleLogger]) +ioc( + `logger`, + new ConsoleLogger({ + level: PUBLIC_DEBUG ? LogLevelName.Debug : LogLevelName.Info, + }), +) const { onAuthChange } = client() diff --git a/packages/dashboard/vite.config.ts b/packages/dashboard/vite.config.ts index d7669607..70e5c69f 100644 --- a/packages/dashboard/vite.config.ts +++ b/packages/dashboard/vite.config.ts @@ -12,6 +12,7 @@ const config: UserConfig = { server: { port: 5174, strictPort: true, + host: 'app.pockethost.lvh.me', hmr: { clientPort: 5174, },