Cors
Beállítottam a cors-t
This commit is contained in:
2
api.js
2
api.js
@@ -2,6 +2,7 @@ import express from 'express';
|
||||
import dotenv from 'dotenv';
|
||||
import crypto from 'crypto';
|
||||
import mysql from 'mysql2/promise';
|
||||
import cors from 'cors';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
@@ -16,6 +17,7 @@ const {
|
||||
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
app.use(cors())
|
||||
|
||||
// --- DB pool ---
|
||||
const pool = mysql.createPool({
|
||||
|
||||
Reference in New Issue
Block a user