UNIQLOが発売しているTシャツに印刷されているプログラムを写経・加筆して実行可能にしてみました。 https://www.uniqlo.com/jp/ja/products/E459561-000
https://youtube.com/shorts/vfnzovi-HG8
https://codesandbox.io/s/r0hx18
- downloading and installing Go: https://go.dev/doc/install
- clone this repository:
git clone git@github.com:yoidea/akamai-t-shirt.git - change the directory:
cd akamai-t-shirt - start a server:
go run main.go
http://localhost:3000
GET /statusGet a status that whether the server is processing.
| Value | Description |
|---|---|
| ACTIVE | processing |
| INACTIVE | not processing |
| TIMEOUT | could not get status in time |
curl localhost:3000/statusINACTIVE
POST /adminRegister target properties to the server.
| Name | Type | Required | Description |
|---|---|---|---|
| target | String | Yes | the name of the target |
| count | Uint32 | Yes | the target of the quantity |
| Value |
|---|
Control message issued for Target: target, Count: count |
curl -X POST -d 'target=ちょろすぎて草Tシャツ' -d 'count=200' localhost:3000/adminControl message issued for Target: ちょろすぎて草Tシャツ, Count: 200