We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3943d1 commit bd5e473Copy full SHA for bd5e473
src/nestjs/index.ts
@@ -23,10 +23,11 @@ export async function useApitally(
23
) {
24
const httpAdapter = app.getHttpAdapter();
25
const instance = httpAdapter.getInstance();
26
- const platform =
27
- instance.use === undefined && typeof instance.register === "function"
28
- ? "fastify"
29
- : "express";
+ const platform = httpAdapter.constructor.name
+ .toLowerCase()
+ .includes("fastify")
+ ? "fastify"
30
+ : "express";
31
32
if (platform === "express") {
33
const { useApitally, setConsumer } = await import("../express/index.js");
0 commit comments