Skip to content

A sample project to demonstrate an APIOps workflow using ngrok and Kubernetes

License

Notifications You must be signed in to change notification settings

ngrok-samples/apiops-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APIOps demo for ngrok

This repo contains a simple Go app that creates an API that reponds with facts about desert tortoises.

This project is designed to be containerized and deployed to a Kubernetes cluster (see deployment.yaml and gateway.yaml), with ingress handled by the ngrok Kubernetes Operator.

There is no database, so changes will not persist between executions.

To start the API:

git clone git@github.com:ngrok-samples/apiops-demo.git
cd apiops-demo
go get
go run main.go

Usage

Get a single random fact:

curl \
  -X GET \
  http://localhost:5000/fact

Get all facts:

curl \
  -X GET \
  http://localhost:5000/facts

Add a new fact:

curl \
  -X POST \ 
  -H "Content-Type: application/json" \
  -d '{"fact": "This is a fact."}' \    
  http://localhost:5000/add

About

A sample project to demonstrate an APIOps workflow using ngrok and Kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published