First Commit
This commit is contained in:
parent
41aa025490
commit
4dfd8cd516
41 changed files with 15479 additions and 2 deletions
18
backend/server.js
Normal file
18
backend/server.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
const express = require('express');
|
||||
const app = express();
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
const cookieParser = require('cookie-parser');
|
||||
app.use(cookieParser());
|
||||
|
||||
const bodyParser = require('body-parser');
|
||||
app.use(bodyParser.urlencoded({extended:true}));
|
||||
app.use(bodyParser.json());
|
||||
|
||||
const cors = require('cors');
|
||||
app.use(cors({origin: 'http://localhost:4200', credentials: true}));
|
||||
|
||||
app.listen(port, '0.0.0.0',() => {
|
||||
console.log (`listening on port ${port}`);
|
||||
});
|
||||
|
||||
Reference in a new issue