mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Add healthcheck endpoint
This commit is contained in:
@@ -97,7 +97,13 @@ export default class BotsManager {
|
|||||||
|
|
||||||
static async launch() {
|
static async launch() {
|
||||||
const application = express();
|
const application = express();
|
||||||
|
|
||||||
|
application.get("/healthcheck", (req, res) => {
|
||||||
|
res.send("Ok!");
|
||||||
|
});
|
||||||
|
|
||||||
application.use((req: Request, res: Response, next: NextFunction) => this.handleUpdate(req, res, next));
|
application.use((req: Request, res: Response, next: NextFunction) => this.handleUpdate(req, res, next));
|
||||||
|
|
||||||
this.server = application.listen(env.WEBHOOK_PORT);
|
this.server = application.listen(env.WEBHOOK_PORT);
|
||||||
console.log("Server started!");
|
console.log("Server started!");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user