New to fly.io. I have a node ts express server hosted in fly.io and a separate client side hosted in cloudflare. I am using nodemailer to send emails from the clientside to my server and this is working well locally. However whenever I try to make calls to my deployed address:
Not a node expert here, put you posted a code fragment that seemingly connects with my-server-v2.fly.dev on port 443, but your error message says something related to IP address 127.0.01 (which, in normal circumstances, is not mapped to my-server-v2.fly.dev) and port 587.
How did you reach the conclusion that its on port 443?
Yes, I can elaborate and share my config.
This is my toml file, I have added the ports there (checked a few issues related to this) but it doesnt work.
If .env is in your .dockerignore, then it won’t be included in your Docker image. You can set the env vars via fly.toml or secrets (fly secrets set ...). See the docs:
Like you said the problem here was that my .env values were not being taken in consideration in my dockerfile. I configured the secrets and it worked. Thank you very much