dockerize app

This commit is contained in:
fred 2025-07-15 12:02:11 -07:00
parent af99a9b4c2
commit 091a21c8e6
9 changed files with 78 additions and 10 deletions

View file

@ -1,11 +1,11 @@
export const getRecipes = async () => {
const response = await fetch("http://localhost:6063/recipes");
const response = await fetch("http://localhost:3000/recipes");
const data = await response.json();
return data;
};
export const getRecipeById = async (id) => {
const response = await fetch(`http://localhost:6063/recipe/${id}`);
const response = await fetch(`http://localhost:3000/recipe/${id}`);
const data = await response.json();
return data;
};
@ -13,7 +13,7 @@ export const getRecipeById = async (id) => {
export const addRecipe = async (recipeData) => {
console.log(JSON.stringify(recipeData))
// return
const response = await fetch("http://localhost:6063/add-recipe", {
const response = await fetch("http://localhost:3000/add-recipe", {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(recipeData)
@ -27,7 +27,7 @@ export const deleteRecipe = async (id) => {
console.log('run delete')
console.log(id)
// return
const response = await fetch("http://localhost:6063/delete-recipe", {
const response = await fetch("http://localhost:3000/delete-recipe", {
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ id })