@karmaniverous/jeeves-server 3.2.1 → 3.3.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.
- package/.tsbuildinfo +1 -1
- package/CHANGELOG.md +19 -1
- package/dist/src/cli/commands/config.js +5 -0
- package/dist/src/config/resolve.js +2 -0
- package/dist/src/config/resolve.test.js +2 -0
- package/dist/src/config/schema.js +11 -0
- package/dist/src/routes/api/status.js +3 -1
- package/dist/src/routes/api/status.test.js +2 -0
- package/dist/src/routes/config.js +40 -0
- package/dist/src/routes/config.test.js +108 -0
- package/dist/src/server.js +4 -2
- package/package.json +2 -1
- package/src/cli/commands/config.ts +4 -0
- package/src/config/resolve.test.ts +2 -0
- package/src/config/resolve.ts +2 -0
- package/src/config/schema.ts +11 -0
- package/src/config/types.ts +2 -0
- package/src/routes/api/status.test.ts +2 -0
- package/src/routes/api/status.ts +3 -1
- package/src/routes/config.test.ts +133 -0
- package/src/routes/config.ts +49 -0
- package/src/server.ts +6 -2
package/src/server.ts
CHANGED
|
@@ -14,6 +14,7 @@ import Fastify from 'fastify';
|
|
|
14
14
|
import { getConfig, initConfig, isConfigInitialized } from './config/index.js';
|
|
15
15
|
import { apiRoute } from './routes/api/index.js';
|
|
16
16
|
import { authRoute } from './routes/auth.js';
|
|
17
|
+
import { registerConfigRoute } from './routes/config.js';
|
|
17
18
|
import { eventRoute } from './routes/event.js';
|
|
18
19
|
import { healthRoute } from './routes/health.js';
|
|
19
20
|
import { keysRoute } from './routes/keys.js';
|
|
@@ -44,6 +45,7 @@ async function start() {
|
|
|
44
45
|
// Register routes
|
|
45
46
|
await fastify.register(staticRoutes);
|
|
46
47
|
await fastify.register(healthRoute);
|
|
48
|
+
registerConfigRoute(fastify);
|
|
47
49
|
await fastify.register(authRoute);
|
|
48
50
|
await fastify.register(keysRoute);
|
|
49
51
|
await fastify.register(eventRoute);
|
|
@@ -83,8 +85,10 @@ async function start() {
|
|
|
83
85
|
// Start queue processor
|
|
84
86
|
startQueueProcessor();
|
|
85
87
|
|
|
86
|
-
await fastify.listen({ port: config.port, host:
|
|
87
|
-
console.log(
|
|
88
|
+
await fastify.listen({ port: config.port, host: config.host });
|
|
89
|
+
console.log(
|
|
90
|
+
`Jeeves server listening on ${config.host}:${String(config.port)}`,
|
|
91
|
+
);
|
|
88
92
|
console.log(`Endpoints:`);
|
|
89
93
|
console.log(` GET /browse/* - File browser SPA`);
|
|
90
94
|
console.log(` GET /api/raw/* - Raw file serving`);
|