"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 body_parser_1 = __importDefault(require("body-parser"));
const path_1 = __importDefault(require("path"));
// rest of the code remains same
const app = (0, express_1.default)();
const PORT = 3000;
app.use((req, res, next) => {
    if (req.url.match(/^\/backend/)) {
        res.status(404).send('404 Not Found');
        return;
    }
    next();
});
app.use('/node_modules', express_1.default.static(path_1.default.join(__dirname + '/../../node_modules/'), { maxAge: -1 }));
app.use('/src', express_1.default.static(path_1.default.join(__dirname + '/../../src/'), { maxAge: -1 }));
app.use(express_1.default.static(path_1.default.join(__dirname + '/../'), { maxAge: -1 }));
app.use(body_parser_1.default.json());
app.use((req, res, next) => {
    console.log(req.url);
    next();
});
app.get('/test', (req, res) => {
    res.status(200).send('hallo!');
});
const pushManager_js_1 = __importDefault(require("./pushManager.js"));
app.use(pushManager_js_1.default);
app.listen(PORT, () => {
    console.log(`⚡️[server]: Server is running at http://localhost:${PORT}`);
});
//# sourceMappingURL=backend.js.map