Im still new to Svelte. I tried to deploy my basic project to vercel to play around.
I have a +page.server.js file that has event.getClientAddress()
to get the ip address. When I look through the log for event.getClientAddress()
, I do get the client's IP but it still throw error 500. The log also shows that I am trying to read 'read properties of undefined'.
On my local machine, I am using import { dev } from '$app/environment';
to set the IP for testing purposes during development. But on vercel logs, event.getClientAddress()
in +page.server.js do give the correct IP address