"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const express = require("express"); const bodyParser = require("body-parser"); const index_1 = require("./routes/index"); const typeorm_1 = require("typeorm"); const cors = require("cors"); const PORT = 3000; typeorm_1.createConnection() .then(async (connection) => { const app = express(); app.use(cors()); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.get('/', (req, res) => res.send('Hello World!')); app.use('/', index_1.default); app.listen(PORT, () => console.log(`Example app listening at http://localhost:${PORT}`)); }) .catch((error) => console.log('TypeORM connection error: ', error)); //# sourceMappingURL=index.js.map