This repository has been archived on 2026-05-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
PolyNotFound/backend/server.js
2021-10-16 15:23:46 +02:00

18 lines
478 B
JavaScript

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}`);
});