revert cors for now
This commit is contained in:
parent
6ad2d6d7d3
commit
c47dac9986
3 changed files with 3 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
||||||
const express = require("express");
|
const express = require("express");
|
||||||
const db = require("./db");
|
const db = require("./db");
|
||||||
const port = 3000;
|
const port = 3000;
|
||||||
|
const cors = require('cors')
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
app.use(cors());
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
// ####### ROUTES #######
|
// ####### ROUTES #######
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"description": "",
|
"description": "",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"cors": "^2.8.5",
|
||||||
"dotenv": "^17.0.1",
|
"dotenv": "^17.0.1",
|
||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"knex": "^3.1.0",
|
"knex": "^3.1.0",
|
||||||
|
|
|
@ -24,7 +24,6 @@ export const addRecipe = async (recipeData) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const deleteRecipe = async (id) => {
|
export const deleteRecipe = async (id) => {
|
||||||
console.log('run delete')
|
|
||||||
console.log(id)
|
console.log(id)
|
||||||
// return
|
// return
|
||||||
const response = await fetch("http://localhost:3000/delete-recipe", {
|
const response = await fetch("http://localhost:3000/delete-recipe", {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue