https://github.com/thorstenhans/unique-spin-apps
https://github.com/thorstenhans/unique-spin-apps
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thorstenhans/unique-spin-apps
- Owner: ThorstenHans
- Created: 2024-10-01T09:09:26.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-01-13T13:46:57.000Z (4 months ago)
- Last Synced: 2025-01-27T04:37:56.273Z (3 months ago)
- Language: Shell
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unique Spin Apps
This is a simple [Spin App](https://github.com/fermyon/spin) that responds to incoming HTTP requests. There are 5000 unique tags available for this artifact (`1`..`5000`).
Every individual Spin App returns it's unique identifier as a HTTP response header (`x-spin-app-id`) and a response body containing the unique app identifier (`Hello, this is Spin App 2!`).
Using unique OCI artifacts, you can ensure Kubernetes (e.g. using [SpinKube](https://spinkube.dev)) has to pull a particular artifact per Spin App deployment.
## Running a Spin App locally
You can also run those apps on your local machine using the `spin` CLI:
```bash
spin up --from thorstenhans/unique-spin-app:3032Serving http://127.0.0.1:3000
Available Routes:
app: http://127.0.0.1:3000 (wildcard)
```From within a new terminal instance you can sent an HTTP request to the Spin App using the `curl` CLI:
```bash
curl -iX GET localhost:3000HTTP/1.1 200 OK
x-spin-app-id: 3032
content-type: text/plain
transfer-encoding: chunked
date: Tue, 01 Oct 2024 10:46:43 GMTHello, this is Spin App 3032!%
```