diff --git a/backend/.env b/backend/.env index 966e78301e6d82c5d0c86d821d0c38eb60d17788..9713a929b248e22f75761d18a6d88d216d126699 100644 --- a/backend/.env +++ b/backend/.env @@ -1,7 +1,14 @@ -MONGODB_URI=mongodb+srv://hillert:rmvpwZp63axO3evc@uploadscluster.delrqyf.mongodb.net/?retryWrites=true&w=majority +MONGODB_URI=mongodb+srv://TDDD27:a0mOaDs7yrpTNcoL@uploadscluster.delrqyf.mongodb.net/?retryWrites=true&w=majority + + JWT_SECRET=TESTKEYFORTOKEN123 SALT=10 -NODE_ENV=development \ No newline at end of file +NODE_ENV=development + + + + +a0mOaDs7yrpTNcoL \ No newline at end of file diff --git a/backend/public/uploads/e0377313-994e-408e-a626-9d7733856418_.jpg b/backend/public/uploads/e0377313-994e-408e-a626-9d7733856418_.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e2ec0afe10f29f9b718f3d77535b3eaf3e0b70e8 Binary files /dev/null and b/backend/public/uploads/e0377313-994e-408e-a626-9d7733856418_.jpg differ diff --git a/frontend/src/components/Post.js b/frontend/src/components/Post.js index f0db5f7c129c4ee7d7f38d469c2918f1846dc716..40bf2d9e1c26a9f22d32b599ffc0653951ce3b76 100644 --- a/frontend/src/components/Post.js +++ b/frontend/src/components/Post.js @@ -23,7 +23,7 @@ const Post = () => { formData.append('recipe',recipe) formData.append('photo',imageData) - axios.post("http://localhost:5000/save", + axios.post("http://localhost:5000/post", formData ) @@ -43,7 +43,7 @@ const Post = () => { <div className={styles.post_container}> <h1>Make your drink!</h1> <input className={styles.post_input1} value={name} onChange={(e) => setName(e.target.value)} placeholder='Title of your drink' type='text'/> - <textarea className={styles.post_input2} value={recipe} onChange={(e) => setRecipe(e.target.value)} placeholder='Recipe:' type='text'/> + <textarea className={styles.post_input2} value={recipe} onChange={(e) => setRecipe(e.target.value)} placeholder='Recipe' type='text'/> <textarea className={styles.post_input2} value={description} onChange={(e) => setDescription(e.target.value)} placeholder='How to make it...' type='text' cols = '40' rows="5"/> <div className={styles.addpicture}>