Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added ping endpoint

Blue Mousef21b278b1a9d
diff --git a/src/app.module.ts b/src/app.module.ts
index 0366e66ff..5e708276c 100644
--- a/src/app.module.ts
+++ b/src/app.module.ts
@@ -14,6 +14,7 @@ import { ActionTokensModule } from './action-tokens/action-tokens.module'
import { ActionToken } from './action-tokens/action-token.entity'
import { TaskManagerModule } from './task-manager/task-manager.module'
import { WebhookModule } from './webhook/webhook.module'
+import { PingModule } from './ping/ping.module'
@Module({
imports: [
@@ -37,6 +38,7 @@ import { WebhookModule } from './webhook/webhook.module'
ProjectModule,
AnalyticsModule,
WebhookModule,
+ PingModule,
],
})
diff --git a/src/ping/ping.controller.spec.ts b/src/ping/ping.controller.spec.ts
new file mode 100644
index 000000000..1adf508f5
--- /dev/null
+++ b/src/ping/ping.controller.spec.ts
@@ -0,0 +1,18 @@
+import { Test, TestingModule } from '@nestjs/testing'
+import { PingController } from './ping.controller'
+
+describe('PingController', () => {
+ let controller: PingController
+
+ beforeEach(async () => {
+ const module: TestingModule = await Test.createTestingModule({
+ controllers: [PingController],
+ }).compile()
+
+ controller = module.get<PingController>(PingController)
+ })
+
+ it('should be defined', () => {
+ expect(controller).toBeDefined()
+ })
+})
diff --git a/src/ping/ping.controller.ts b/src/ping/ping.controller.ts
new file mode 100644
index 000000000..68b8ade64
--- /dev/null
+++ b/src/ping/ping.controller.ts
@@ -0,0 +1,13 @@
+import { Controller, Get } from '@nestjs/common'
+import { ApiTags } from '@nestjs/swagger'
+
+@ApiTags('Ping')
+@Controller('ping')
+export class PingController {
+ constructor() {}
+
+ @Get('/')
+ async get(): Promise<any> {
+ return
+ }
+}
diff --git a/src/ping/ping.module.ts b/src/ping/ping.module.ts
new file mode 100644
index 000000000..19a1f77e9
--- /dev/null
+++ b/src/ping/ping.module.ts
@@ -0,0 +1,8 @@
+import { Module } from '@nestjs/common'
+
+import { PingController } from './ping.controller'
+
+@Module({
+ controllers: [PingController],
+})
+export class PingModule {}