Newer
Older
const express = require('express')
const app = express()
const port = 3000
var cors = require('cors');
var session = require('express-session');
const crypto = require('node:crypto');
app.use(session({
secret:crypto.randomUUID(),
resave:false,
saveUninitialized:false
}));
app.use(express.urlencoded({ extended: true }));
app.use(cors({origin: 'http://localhost:5173', credentials : true}));