-2

I have set up a Node.js server in Google Cloud Platform App Engine, and have also configured a custom domain, which is correctly configured and has a SSL cert.

However, I can't figure out how to actually serve through the domain.

brentonstrine
  • 21,694
  • 25
  • 74
  • 120
  • 2
    can you add detail on what you have done, what don't work and with which error. – guillaume blaquiere Jul 30 '20 at 19:20
  • 1
    I understand that you followed [this guide](https://cloud.google.com/appengine/docs/standard/nodejs/mapping-custom-domains) to configure the custom domain and [this guide](https://cloud.google.com/appengine/docs/standard/nodejs/securing-custom-domains-with-ssl) to set the SSL certificate. Nonethelss, I don't really understand what exactly you are using as a server. Are you using the [built-in HTTP module](https://www.w3schools.com/nodejs/nodejs_http.asp) to listen and serve requests? You basically just need to create the logic to listen and serve requests. – Daniel Ocando Jul 30 '20 at 22:52
  • @guillaumeblaquiere I have explained what I have done. The server is set up and everything works fine. There are no errors. I simply can't find documentation on how to deploy it. – brentonstrine Jul 30 '20 at 23:38
  • @DanielOcando Yes exactly. I have written my own (very simple) server in JavaScript. It does use the http module. It works--but only on the web preview. I want it to deploy. So it serves through my domain. – brentonstrine Jul 30 '20 at 23:40
  • So, you have the custom domain configured as per @DanielOcando suggestion and your concern is: "How do I deploy a GAE app to a Custom domain"? Getting a better understanding of your issue will allow us to better help you. Cheers :) – maniSidhu98 Jul 31 '20 at 03:19
  • @maniSidhu98 Yes. – brentonstrine Jul 31 '20 at 12:29

1 Answers1

0

In the GCP terminal, run this command:

gcloud app deploy

Since the server is already set up and working and the domain is already configured, that command is all that's needed to deploy.

brentonstrine
  • 21,694
  • 25
  • 74
  • 120