mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 07:25:36 +01:00
Add healthcheck endpoint
This commit is contained in:
@@ -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!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user