File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import { fastify , FastifyInstance , FastifyServerOptions } from 'fastify'
2-
3- import FastifyMetrics from 'fastify-metrics'
2+ import fastifyMetrics from 'fastify-metrics'
43
54export function build ( opts : FastifyServerOptions = { } ) : FastifyInstance {
65 const app = fastify ( opts )
7- // @ts -ignore fastify-metrics doesn't work with NodeNext resolution
8- app . register ( FastifyMetrics , {
6+ app . register ( fastifyMetrics . default , {
97 endpoint : '/metrics' ,
108 routeMetrics : { enabled : false } ,
119 } )
Original file line number Diff line number Diff line change @@ -158,9 +158,15 @@ if (EXPORT_DOCS) {
158158 app . log . error ( err )
159159 }
160160 await app . close ( )
161+ await adminApp . close ( )
161162 } )
162163 app . addHook ( 'onClose' , async ( ) => {
163164 closeListeners . uninstall ( )
165+ await adminApp . close ( )
166+ } )
167+ adminApp . addHook ( 'onClose' , async ( ) => {
168+ closeListeners . uninstall ( )
169+ await app . close ( )
164170 } )
165171
166172 app . listen ( { port : PG_META_PORT , host : PG_META_HOST } , ( err ) => {
You can’t perform that action at this time.
0 commit comments