fastify ile google cloud gibi VM’lere http uzerinden baglanmada sorun yasiyorsak 0.0.0.0’i host name olarak atamaliyiz

Google Cloud Uzerinden Izin Vermek

  • Google Cloud Firewall uzerinden Firewall Rules olustur

  • TCP hem 8080, hem de 22 izni olmalidir

    • 8080 sizin sectiginiz port olarak alindi

      	const ws = Websocket({port: 8080))
      
  • Target tags kismindaki degeri instance icin networks tags kismina yaz

💡 Sunucu yeniden baslatmaya gerek yoktur

Fastify uzerinden tum ip erisimlerini acmaliyiz

try {
	await this.fastify.listen({ port: 3000, host: "0.0.0.0" })
} catch (error) {
	this.fastify.log.error(error)
	process.exit(1)
}

Last updated

© 2024 ~ Yunus Emre Ak ~ yEmreAk