@pg-boss/dashboard 0.0.2 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +11 -17
  2. package/package.json +2 -2
package/bin/cli.js CHANGED
@@ -1,21 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { serve } from '@hono/node-server'
2
+ import { fileURLToPath } from 'url'
3
+ import { dirname, join } from 'path'
4
+ import process from 'process'
3
5
 
4
- const port = process.env.PORT || 3000
5
- const host = process.env.HOST || '0.0.0.0'
6
+ // Set PORT and HOST before importing the server
7
+ if (!process.env.PORT) process.env.PORT = '3000'
8
+ if (!process.env.HOST) process.env.HOST = '0.0.0.0'
6
9
 
7
- // Import the built server
8
- const { default: server } = await import('../build/server/index.js')
10
+ // Change to package directory so relative paths in the build resolve correctly
11
+ const packageRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
12
+ process.chdir(packageRoot)
9
13
 
10
- // Start the server
11
- serve(
12
- {
13
- fetch: server.fetch,
14
- port: parseInt(String(port), 10),
15
- hostname: host,
16
- },
17
- (info) => {
18
- console.log(`pg-boss dashboard server running at http://${info.address}:${info.port}`)
19
- console.log('Open your browser to view the dashboard')
20
- }
21
- )
14
+ // Import the built server - it will auto-start in production mode
15
+ await import('../build/server/index.js')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pg-boss/dashboard",
3
- "version": "0.0.2",
3
+ "version": "1.0.1",
4
4
  "description": "Web dashboard for monitoring and managing pg-boss job queues",
5
5
  "keywords": [
6
6
  "pg-boss",
@@ -49,7 +49,7 @@
49
49
  "isbot": "^5.1.34",
50
50
  "lucide-react": "^0.563.0",
51
51
  "pg": "^8.18.0",
52
- "pg-boss": "^12.11.0",
52
+ "pg-boss": "^12.11.1",
53
53
  "react": "^19.2.4",
54
54
  "react-dom": "^19.2.4",
55
55
  "react-router": "^7.13.0",