API development is a crucial part in modern web applications. APIs enable communication between services, applications and end users. APIs allows applications to expose data and/or functionality to other services.
Stop this madness and show me the code!
Go API handlers
You can deploy an API in Google Cloud using a variety of services, including:
- Cloud Endpoints: Distribute management API system. Provides logs and metrics, API hosting and authorization.
- Google App Engine: This is a fast, scalable, and easy-to-set-up and maintain method.
To deploy an API in Google Cloud, you can:
- Create an OpenAPI spec that describes your API.
- Configure the routes to your Cloud Run backend service.
- Deploy your API configuration.
- Deploy your Backend API.
Cloud endpoints ese the distribute Extensible Service Proxy to serve APIs with low latency and high performance. Provides a convenient way to take care of APIs management tasks such as authorization, monitoring and rate limiting.
Drawback
If your service was deployed to the App Engine flexible environment,
you had to re-deploy your service every time you deployed changes to the API configuration, even if there were no changes to the source code
For versions 1.18 and later are built using buildpacks. This enables you to choose an operating system.
Buildpacks are group together into collections called builders that can,
- Analyze project source code
- Create a build plan
- Generate a container image
App.yaml
This file acts as a deployment descriptor of a specific service version.
If you’re interested in learning more about building APIs in Google Cloud, please stay tune to my upcoming articles.
cannot find module for path io/fs
This was a funny issue since you need to set a specify version of the Go runtime for the build flow to works.
(gcloud.app.deploy) INVALID_ARGUMENT: You may not have more than 32 total max instances in your project.
In the manual_scalling
configuration set the instances to 1
.