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 [email protected]:yoidea/akamai-t-shirt.git
- change the directory:
cd akamai-t-shirt
- start a server:
go run main.go
http://localhost:3000
GET /status
Get 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/status
INACTIVE
POST /admin
Register 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/admin
Control message issued for Target: ちょろすぎて草Tシャツ, Count: 200