chore: initial project commit

This commit is contained in:
Joe Fleming
2021-07-23 15:10:14 -07:00
commit bfe452f820
6 changed files with 2116 additions and 0 deletions

18
src/index.js Normal file
View File

@@ -0,0 +1,18 @@
const express = require('express');
const cors = require('cors');
const app = express();
app.use(cors());
app.use(express.urlencoded({ extended: false }));
app.use(express.json());
app.use(function (req, res) {
res.setHeader('Content-Type', 'text/plain');
res.write('you posted:\n');
res.end(JSON.stringify(req.body, null, 2));
});
app.listen(80, function () {
console.log('CORS-enabled web server listening on port 80');
});