Skip to content

Commit

Permalink
Update xstate and restate versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkleeman committed Sep 5, 2024
1 parent 1455adc commit 9b778f2
Show file tree
Hide file tree
Showing 5 changed files with 378 additions and 2,251 deletions.
12 changes: 6 additions & 6 deletions patterns-use-cases/xstate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ To try out this example:

```bash
# start a local Restate instance
docker run -d -it --network=host --name restate_dev --rm restatedev/restate:0.8.1
restate-server
# start the service
npm run dev
npm run example
# register the state machine service against restate
npx @restatedev/restate@0.8.1 dep register http://localhost:9080
restate dep register http://localhost:9080

# create a state machine
curl http://localhost:8080/auth/create --json '{"key": "myMachine"}'
curl http://localhost:8080/auth/myMachine/create
# watch the state
watch -n1 'curl -s http://localhost:8080/auth/snapshot --json "{\"key\": \"myMachine\"}"'
watch -n1 'curl -s http://localhost:8080/auth/myMachine/snapshot'
# kick off the machine
curl http://localhost:8080/auth/send --json '{"key": "myMachine", "request": {"event": {"type": "AUTH"}}}'
curl http://localhost:8080/auth/myMachine/send --json '{"event": {"type": "AUTH"}}'
# and watch the auth flow progress!
```
Loading

0 comments on commit 9b778f2

Please sign in to comment.