implemented connection to the backend

This commit is contained in:
2024-02-06 17:18:37 +01:00
parent 876d066f3d
commit 73d0b89b4d
11 changed files with 409 additions and 62 deletions

View File

@ -20,7 +20,7 @@ const app = express();
//setup cors
const corsOptions = {
origin: 'https://localhost:4173',
origin: 'https://localhost:3000',
headers: 'authorization, content-type',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true,
@ -42,11 +42,11 @@ var certificate = fs.readFileSync('../certs/localhost.crt');
var server = https.createServer({
key: privateKey,
cert: certificate
cert: certificate,
}, app);
// const PORT = process.env.PORT || 5172;
const PORT = process.env.PORT || config.port;
// const PORT = process.env.PORT || 4172;
const PORT = process.env.PORT || serversideConfig.port;
//PORT
server.listen(PORT, () => {