@hienlh/ppm 0.1.1 → 0.1.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.
- package/package.json +1 -1
- package/src/server/index.ts +17 -3
package/package.json
CHANGED
package/src/server/index.ts
CHANGED
|
@@ -114,11 +114,25 @@ export async function startServer(options: {
|
|
|
114
114
|
} as Parameters<typeof Bun.serve>[0] extends { websocket?: infer W } ? W : never,
|
|
115
115
|
});
|
|
116
116
|
|
|
117
|
-
console.log(
|
|
118
|
-
console.log(`
|
|
117
|
+
console.log(`\n PPM v0.1.2 ready\n`);
|
|
118
|
+
console.log(` ➜ Local: http://localhost:${server.port}/`);
|
|
119
|
+
|
|
120
|
+
// List all network interfaces
|
|
121
|
+
const { networkInterfaces } = await import("node:os");
|
|
122
|
+
const nets = networkInterfaces();
|
|
123
|
+
for (const name of Object.keys(nets)) {
|
|
124
|
+
for (const net of nets[name] ?? []) {
|
|
125
|
+
if (net.family === "IPv4" && !net.internal) {
|
|
126
|
+
console.log(` ➜ Network: http://${net.address}:${server.port}/`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
console.log(`\n Auth: ${configService.get("auth").enabled ? "enabled" : "disabled"}`);
|
|
119
132
|
if (configService.get("auth").enabled) {
|
|
120
|
-
console.log(`Token: ${configService.get("auth").token}`);
|
|
133
|
+
console.log(` Token: ${configService.get("auth").token}`);
|
|
121
134
|
}
|
|
135
|
+
console.log();
|
|
122
136
|
}
|
|
123
137
|
|
|
124
138
|
// Internal entry point for daemon child process
|