Files
tiny-webhook/dist/index.js
Cauê Faleiros c687fd2bd1
Some checks failed
Build and Deploy / build-and-push (push) Failing after 4m14s
first commit
2026-04-09 09:45:02 -03:00

21 lines
892 B
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = __importDefault(require("express"));
const dotenv_1 = __importDefault(require("dotenv"));
const webhook_route_1 = __importDefault(require("./routes/webhook.route"));
dotenv_1.default.config();
const app = (0, express_1.default)();
const port = process.env.PORT || 3000;
app.use(express_1.default.json());
app.use(express_1.default.urlencoded({ extended: true }));
app.use('/api/webhooks', webhook_route_1.default);
app.get('/health', (req, res) => {
res.status(200).json({ status: 'OK', message: 'Tiny-n8n middleware is running.' });
});
app.listen(port, () => {
console.log(`[server]: Middleware server is running at http://localhost:${port}`);
});