systemlens 1.0.0 → 1.0.2

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/package.json +4 -4
  2. package/server.js +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systemlens",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "An intelligent system explainer that converts raw metrics into human-readable insights. Not a monitor — a system mentor.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -46,11 +46,11 @@
46
46
  "license": "MIT",
47
47
  "repository": {
48
48
  "type": "git",
49
- "url": "https://github.com/neeraj/systemlens"
49
+ "url": "git+https://github.com/NeerajYadav-coder/SystemLens.git"
50
50
  },
51
- "homepage": "https://github.com/neeraj/systemlens#readme",
51
+ "homepage": "https://github.com/NeerajYadav-coder/SystemLens#readme",
52
52
  "bugs": {
53
- "url": "https://github.com/neeraj/systemlens/issues"
53
+ "url": "https://github.com/NeerajYadav-coder/SystemLens/issues"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=18.0.0"
package/server.js CHANGED
@@ -85,6 +85,23 @@ broadcastTimer = setInterval(broadcastToAll, BROADCAST_INTERVAL);
85
85
  // ─── Start Server ────────────────────────────────────────────────
86
86
  const PORT = process.env.PORT || 3777;
87
87
 
88
+ server.on('error', (err) => {
89
+ if (err.code === 'EADDRINUSE') {
90
+ console.error(`
91
+ ❌ Port ${PORT} is already in use!
92
+
93
+ Another instance of SystemLens (or another app) is using this port.
94
+
95
+ Fix options:
96
+ 1. Kill the existing process: kill $(lsof -ti:${PORT})
97
+ 2. Use a different port: systemlens --web --port 4000
98
+ `);
99
+ process.exit(1);
100
+ } else {
101
+ throw err;
102
+ }
103
+ });
104
+
88
105
  server.listen(PORT, () => {
89
106
  console.log(`
90
107
  🔬 SystemLens Web Dashboard