#how to put Nest js with Fastify in Production

1 messages · Page 1 of 1 (latest)

wary ice
#

Where are you deploying to? What's your production environment?

sterile trail
#

to a local server with linux

wary ice
#

That doesn't really help much. Are you using a reverse proxy, are you exposing the ports at the router level, binding to 80 or 443 using sudo, something else?

sterile trail
#

Im not using reverse proxy , im kinda new with this but when i run prod and tryna access it says connect refused

wary ice
#

Okay, so what are you doing? What steps are you taking at the moment?

sterile trail
#

I deploy it to a server , do the cors , running it and then when My front end do a petition or i do trying to access the url it says connection refused i know im doing something wrong

#

I don't know if i miss a fastify config or something

wary ice
#

What steps are you taking when deploying it? Do you have access to the server logs?

sterile trail
#

With Github actions
Justo the normal git commands on the script and then build and start:prod but when i do curl on My server terminal i did response but when i do outside the server it response connection refused on the browser

wary ice
#

Are you running on port 3000?

sterile trail
#

Yes

wary ice
#

So how do you try to hit port 3000, as that port is not usually exposed from a server to the internet

sterile trail
#

How can i do it ? Just change the port?

wary ice
#

That's usually why you'd use a reverse proxy. Something that will accept traffic to port 80/443 (depending on http/https) and forward it to your server. This really isn't an issue with Nest, but a general server deployment knowledge