Init node dependencies and typescript

This commit is contained in:
dario-cfpt
2019-11-26 10:11:09 +01:00
parent cd91335f44
commit 1939d88457
7 changed files with 868 additions and 1 deletions

22
server/dist/index.js vendored Normal file
View File

@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
const port = 3000;
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(function (req, res, next) {
// Allow client to receive the data
// from : https://enable-cors.org/server_expressjs.html
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
app.get('/', (req, res) => {
res.send('Hello World!');
});
app.listen(port, () => {
console.log(`Example app listening on port ${port}!`);
});
//# sourceMappingURL=index.js.map