adrianhajdin / project_ai_mern_image_generation

Build and Deploy a Full Stack MERN AI Image Generation App MidJourney & DALL E Clone
https://jsmastery.pro
1.08k stars 302 forks source link

SyntaxError: Unexpected token 'B', "Billing ha"... is not valid JSON #32

Closed iamutkarshyadav closed 1 year ago

iamutkarshyadav commented 1 year ago

Screenshot 2023-02-18 215930

binyamdawit commented 1 year ago

Hey @iamutkarshyadav I think I might have the solution for that!

in your CreatePost.jsx file under the generateImage function. Change your fetch response to => const response = await fetch('http://localhost:8080/api/v1/dalle', { Hope that helps.

binyamdawit commented 1 year ago

And if that works, I suggest you do the same thing for all the other ones (even in your Home.jsx). Such as for the fetch response: https://dalle-arbb.onrender.com/api/v1/post, change it to => http://localhost:8080/api/v1/post

iamutkarshyadav commented 1 year ago

thanks, it worked!