I’m new at web dev, so this might be poorly worded…
I’m using Functions to get around a CORS issue with an API I’ll be using for a little Routify web app. I got it working, but not locally. The problem seems to be that the
netlify dev command gives me two separate servers at two different ports, one for functions at port 8888 and a web server at port 5000. Sending requests to an endpoint url using the former port works fine (confirmed with Postman). But my client at port 5000 can’t reach that endpoint, because of CORS. The deployed site works fine.
Maybe the server at port 8888 is supposed to have it all, but if so, it fails at the web part. When I visit it in the browser, it shows this mysterious text: “e[91mâ—ˆe[39m Function invocation failed: [object Object]”, and the console shows three statuscode 500 errors.
I suppose this might have something to do with a proxy, but the Netlify Dev docs explicitly says “One immediate benefit is no need for proxying since Netlify Dev does that for you”. Or it could have something to do with the project type detector. There isn’t one for Routify, and I have no idea what to write in the netlify.toml under [dev].
Does this sound familiar to anyone? Any help is deeply appreciated!
My project is almost all Routify boilerplate. I assume the
scripts/netlify/netlify.toml is where I need to make changes for
netlify dev to work properly.