Home
Softono

Gcp Proxy Func

Open source MIT JavaScript
38
Stars
10
Forks
0
Issues
2
Watchers
6 years
Last Commit

 About Gcp Proxy Func

Google Cloud Function to proxy requests to host specified in config file

Platforms

Web Self-hosted Cloud

Languages

JavaScript

Links

Need Help Installing Gcp Proxy Func?

We provide expert installation service for this software. Our team will install, configure, and secure Gcp Proxy Func on your server. plans start at just $30.

Gcp Proxy Func

View on GitHub

gcp-proxy-func

Very simple Google Cloud Function that proxies requests using Express and http-proxy-middleware. You define the address that requests should be proxied to by filling out config.js (copy config.example.js to config.js, and then change the URL).

Using

Fill in config.js, and then either zip up the files and upload via Gcloud admin, or use the Gcloud CLI and npm run deploy. Or see below if using this to proxy to Ngrok.

Ngrok

If you want to use this to have a stable Google Cloud Function address that proxies requests to a dynamic Ngrok address (see this blog post for details), you can automatically redeploy the function with the correct Ngrok public URL after it has changed, by using npm run ngrok-deploy.

This command will grab the Ngrok public URL via the localhost API, update config.js by using fs to write to the file, and then redeploy your GCloud function to point to the updated URL.