A template for developing .NET Core framework applications on Cloud Native Build (CNB) platform, implementing simple counter read/write APIs with MySQL database running in the cloud native environment.

Click the "Cloud Native Development" button to launch the online development environment with docker-compose auto-configuration! One-click setup! Let's go!

To build and debug locally, please refer to Microsoft .NET Documentation.
. ├── aspnetapp ├── docker-compose.yml ├── Dockerfile ├── .gitignore ├── README.md └── mysql-init └── init.sql └── mysql-config └── my.cnf
docker-compose.yml: Docker Compose configuration fileaspnetapp: Main .NET project implementing core APIsDockerfile: Container configurationmysql-init/init.sql: MySQL initialization scriptGet current counter value
None
code: Error codedata: Current counter value{
"code": 0,
"data": 42
}
curl https://<cloud-environment-domain>/api/count
Update counter value (increment or reset)
action: string enum
"inc": Increment counter by 1"clear": Reset counter to 0{ "action": "inc" }
code: Error codedata: Current counter value{
"code": 0,
"data": 42
}
curl -X POST -H 'content-type: application/json' -d '{"action": "inc"}' https://<cloud-environment-domain>/api/count