A simple Deno application demonstrating how to connect to a Scaleway Managed MongoDB® instance using Mongoose. It relies on Scaleway's Private Networks for secure communication.
This Terraform pushes a Docker image to a Scaleway Container Registry before deploying the Serverless Container.
Make sure to log in to the Scaleway Container Registry beforehand:
scw registry loginterraform init
terraform applyThat's it! You should be able to access the deployed Serverless Container's endpoint from the Scaleway Console.
Once deployed, you can interact with the application using HTTP requests.
CONTAINER_URL="https://your-container-url"
# Check MongoDB® connection
curl $CONTAINER_URL/check_connection
# Add some people
curl $CONTAINER_URL/person/george
curl $CONTAINER_URL/person/alice
# List all people
curl $CONTAINER_URL/peopleMake sure to destroy the Terraform-managed infrastructure when you're done:
terraform destroy