Back

NodeJS Function Hot Swap ENV does not reload env

  • 0
  • Self Hosted
  • Functions
  • Messaging
  • Web
AidsMcGhee
30 Sep, 2024, 14:07

Changed ENV ip address from 10.77 to 10.22

TypeScript
Info: Hot-swapping function.. Files with change are .env
Preparing for start ...
Success: Visit http://localhost:3000/ to execute your function.
Starting ...
HTTP server successfully started!
Native logs detected. Use context.log() or context.error() for better experience.
ConnectionError: Failed to connect to 192.168.10.77:1433 in 15000ms

Did not reload env

TL;DR
Problem: NodeJS function is not reloading environment variables after a hot swap. Solution: The developers changed the IP address in the environment variables from 10.77 to 10.22, but the hot swap did not reflect this change. Restarting the function manually is faster than trying to hot-reload.
AidsMcGhee
30 Sep, 2024, 14:10

It's faster to stop and start the function than it is to hot-reload

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more