Deploy to Vercel and Render

This commit is contained in:
Takeshi Kimata
2024-05-13 22:41:26 +09:00
parent be62d848cc
commit ca034407e1
5 changed files with 61 additions and 25 deletions

View File

@@ -5,8 +5,9 @@ const app = express();
// enable frontend access
const cors = require("cors");
const frontendOrigin = process.env.FRONTEND_ORIGIN || 'http://localhost:3000';
const corsOptions = {
origin: "http://localhost:3000",
origin: frontendOrigin,
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
};
app.use(cors(corsOptions));