Deploy the API Definition
Using golem-cli, deploying the API definition is straight forward.
Terminal
golem-cli api-deployment deploy --definition my-shopping-cart-v1/0.0.4 --host localhost:9006
The above command returns the following:
Terminal
{
"apiDefinitions": [
{
"id": "my-shopping-cart-v1",
"version": "0.0.4"
}
],
"site": {
"host": "localhost:9006",
"subdomain": null
},
"createdAt": "2024-10-31T07:36:47.497267721Z"
}
Here we deploy the definition and now the endpoints should be available at host
localhost:9006
. If you were following docker examples to spin up Golem, then the port has to be 9006.
Refer to .env
in docker-examples folder in Golem OSS.
You can test the deployment now, by trying to call the endpoint defined in the API definition.