I have been using Neon DB in my expo-react-native application for handling database related functions where I stored the functions in a folder called (api) so my URLs where much more like this "/(api)/user" but when I created an APK for production I was told such URL’s are invalid "Fetch error:’, [TypeError: Invalid URL: /(api)/driver/create]" I was told I will need something like "https://… " url to make it possible to fetch data on my database
I tried contacting Neon DB support but they are not replying and I need the solution really faster
2
Answers
I know nothing about React or Neon DB, but it sounds pretty straightforward. You need to resolve that path to a full URL, so for example instead of "/(api)/user", you need to provide something like "https://www.allanally.com/api/user".
Based on a quick search for "react resolve URL", it seems like the resolvePath method may be what you need.
Having same issue, I’m using neon in my expo-react-native, all things working well in localhost but database not working when i build apk and using it on device.
Please let me know if you resolve this error.