Add healthcheck endpoint

This commit is contained in:
2022-01-02 14:59:24 +03:00
parent 41fe429bde
commit 58390a577c

View File

@@ -97,7 +97,13 @@ export default class BotsManager {
static async launch() {
const application = express();
application.get("/healthcheck", (req, res) => {
res.send("Ok!");
});
application.use((req: Request, res: Response, next: NextFunction) => this.handleUpdate(req, res, next));
this.server = application.listen(env.WEBHOOK_PORT);
console.log("Server started!");