Skip to content

Commit 8f9890c

Browse files
committed
Support a dialects endpoint
1 parent 3d206cc commit 8f9890c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/handler.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,19 @@ export class StarbaseDB {
100100
})
101101
})
102102

103+
this.app.get('/status/database', async (c) => {
104+
return createResponse(
105+
{
106+
dialects: {
107+
external: this.dataSource.external?.dialect,
108+
hyperdrive: 'postgresql',
109+
},
110+
},
111+
undefined,
112+
200
113+
)
114+
})
115+
103116
if (this.getFeature('rest')) {
104117
this.app.all('/rest/*', async (c) => {
105118
return this.liteREST.handleRequest(c.req.raw)

0 commit comments

Comments
 (0)