How to port proxy an API
We built a NodeJS API that serves a HTML template and exposes a few user management handlers.
The app is served from an Amazon EC2 instance with a Security Group that opens port 3000 to the internet.
We don't select Enable Cache because we don't want to cache API responses. We Use HTTP because our domain is SSL-enabled but our API is not.
To try out the API, check out the instructions on the API's home page.
In your Cloudflare Dashboard, click the DNS tab and add a CNAME record pointing your desired subdomain at your server.
Ensure your service can communicate with the internet. Our service is
running on an EC2 instance, so we add our
Target Port to
the Port Range field in our EC2 Security Policy.
Once the service is open to the internet, we configured and installed Portzilla with the following options.
Once installed, navigate to your service's
Route URL. Our
browser is rendering the root path of our API.