diff options
| author | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-11-05 08:12:54 +0100 |
|---|---|---|
| committer | Arnaud Bailly <arnaud@pankzsoft.com> | 2025-11-05 08:15:15 +0100 |
| commit | abd07940e50d4b86024410971fc2c4dff058fd48 (patch) | |
| tree | b0d7710bf7ca0312adb76b23c928b52ef73889a4 /lambda-calcul/haskell | |
| parent | 92b8d663a034cd35fdc4191bcd8c8ce980931b61 (diff) | |
| download | lambda-nantes-abd07940e50d4b86024410971fc2c4dff058fd48.tar.gz | |
add simple demo script
Diffstat (limited to 'lambda-calcul/haskell')
| -rwxr-xr-x | lambda-calcul/haskell/demo.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lambda-calcul/haskell/demo.sh b/lambda-calcul/haskell/demo.sh new file mode 100755 index 0000000..b725659 --- /dev/null +++ b/lambda-calcul/haskell/demo.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +ALICE=$(curl -s -X POST -H 'content-type: application/json' https://lambda.pankzsoft.net/api/register -d '"alice"' | jq -r) +echo "registered alice with token $ALICE" +sleep 2 + +BOB=$(curl -s -X POST -H 'content-type: application/json' https://lambda.pankzsoft.net/api/register -d '"bob"' | jq -r) +echo "registered bob with token $BOB" +sleep 2 + +CHARLIE=$(curl -s -X POST -H 'content-type: application/json' https://lambda.pankzsoft.net/api/register -d '"charlie"' | jq -r) +echo "registered charlie with token $CHARLIE" +sleep 2 + +curl -s -X POST -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/challenge?token=$ALICE" -d '"x"' +echo "alice submitted 'x'" +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/score?token=$ALICE" +echo "" +sleep 2 + +curl -s -X POST -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/challenge?token=$BOB" -d '"y"' +echo "bob submitted 'y'" +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/score?token=$BOB" +echo "" +sleep 2 + +curl -s -X POST -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/challenge?token=$CHARLIE" -d '"x"' +echo "charlie submitted 'x'" +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/score?token=$CHARLIE" +echo "" +sleep 2 + +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/leaderboard" + +wait |
