feat: use capture

This commit is contained in:
karishmas6
2024-10-29 04:00:33 +05:30
parent 159cf3bc63
commit 2b9882774f

View File

@@ -15,7 +15,7 @@ import { SERVER_PORT } from "./constants/config";
import { Server } from "socket.io"; import { Server } from "socket.io";
import { readdirSync } from "fs" import { readdirSync } from "fs"
import { fork } from 'child_process'; import { fork } from 'child_process';
import captureServerAnalytics from "./utils/analytics"; import { capture } from "./utils/analytics";
import swaggerUi from 'swagger-ui-express'; import swaggerUi from 'swagger-ui-express';
import swaggerSpec from './swagger/config'; import swaggerSpec from './swagger/config';
@@ -77,10 +77,11 @@ workerProcess.on('exit', (code) => {
}); });
app.get('/', function (req, res) { app.get('/', function (req, res) {
captureServerAnalytics.capture({ capture(
distinctId: 'maxun-oss-server-run', 'maxun-oss-server-run', {
event: 'server_started', event: 'server_started',
}); }
);
return res.send('Maxun server started 🚀'); return res.send('Maxun server started 🚀');
}); });