File tree Expand file tree Collapse file tree 9 files changed +23
-16
lines changed
async-signals-payment/async-signals-payment-typescript
durable-promises/durable-promises-typescript
payment-state-machine/payment-state-machine-typescript
state-machines/state-machines-typescript
ticket-reservation/ticket-reservation-typescript Expand file tree Collapse file tree 9 files changed +23
-16
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ webhooks to your local machine.
31
31
32
32
4 . Run this application code here: ` npm run app-dev `
33
33
34
- 5 . Connect the apps: ` npx restate dep reg localhost:9080 `
34
+ 5 . Connect the apps: ` npx restate deployment register localhost:9080 `
35
35
36
36
6 . Run launch _ ngrok_ : Get a free account and download the binary, or launch a docker container.
37
37
Make it forward http calls to local port 8080
Original file line number Diff line number Diff line change 13
13
"stripe" : " ^14.15.0"
14
14
},
15
15
"devDependencies" : {
16
- "@restatedev/restate" : " 0.8.0" ,
17
- "@restatedev/restate-server" : " 0.8.0" ,
16
+ "@restatedev/restate" : " ^0.9.2" ,
17
+ "@restatedev/restate-server" : " ^0.9.2" ,
18
+ "@types/node" : " ^20.12.12" ,
18
19
"ts-node-dev" : " ^1.1.1" ,
19
20
"typescript" : " ^5.0.2"
20
21
}
Original file line number Diff line number Diff line change 15
15
},
16
16
"dependencies" : {
17
17
"@restatedev/restate-sdk" : " ^0.9.2" ,
18
- "@restatedev/restate-sdk-clients" : " dev "
18
+ "@restatedev/restate-sdk-clients" : " ^0.9.2 "
19
19
},
20
20
"devDependencies" : {
21
- "@restatedev/restate" : " 0.8.0" ,
22
- "@restatedev/restate-server" : " 0.8.0" ,
21
+ "@restatedev/restate" : " ^0.9.2" ,
22
+ "@restatedev/restate-server" : " ^0.9.2" ,
23
+ "@types/node" : " ^20.12.7" ,
23
24
"ts-node" : " ^10.9.2" ,
24
25
"typescript" : " ^5.0.2"
25
26
}
Original file line number Diff line number Diff line change @@ -23,16 +23,17 @@ and failures.
23
23
24
24
## Running this example
25
25
26
- Start a Restate Server: ` npx restate-server `
26
+ First, install all dependencies via ` npm install ` .
27
27
28
- Build and start the example
28
+ Next, start a Restate Server: ` npx restate-server `
29
+
30
+ Now build and start the example (in a new terminal):
29
31
``` shell
30
- npm install
31
32
npm run build
32
33
npm run app
33
34
```
34
35
35
- Register the services: ` npx restate dep reg "localhost:9080" `
36
+ Register the services: ` npx restate deployment register "localhost:9080" `
36
37
37
38
Make some requests:
38
39
Original file line number Diff line number Diff line change 16
16
"@restatedev/restate-sdk" : " ^0.9.2"
17
17
},
18
18
"devDependencies" : {
19
- "@restatedev/restate" : " 0.8.0" ,
20
- "@restatedev/restate-server" : " 0.8.0" ,
19
+ "@restatedev/restate" : " ^0.9.2" ,
20
+ "@restatedev/restate-server" : " ^0.9.2" ,
21
+ "@types/node" : " ^20.12.7" ,
21
22
"ts-node-dev" : " ^2.0.0" ,
22
23
"typescript" : " ^5.1.6"
23
24
}
Original file line number Diff line number Diff line change 10
10
"@restatedev/restate-sdk" : " ^0.9.2"
11
11
},
12
12
"devDependencies" : {
13
+ "@types/node" : " ^20.12.7" ,
13
14
"typescript" : " ^5.0.2"
14
15
}
15
16
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ avoiding accidental state corruption and concurrency issues.
25
25
* Start Restate Server in a separate shell: ` npx restate-server `
26
26
* Start this example: ` npm run example ` . (Use ` npm run example-crash ` to use the
27
27
variant that crashes the process and restarts, to see the state recovery happen).
28
- * Register the example at Restate server by calling ` npx restate -y dep reg --force "localhost:9080" ` .
28
+ * Register the example at Restate server by calling ` npx restate -y deployment register --force "localhost:9080" ` .
29
29
30
30
Invoke the state machine transitions like
31
31
``` shell
Original file line number Diff line number Diff line change 15
15
"@restatedev/restate-sdk" : " ^0.9.2"
16
16
},
17
17
"devDependencies" : {
18
- "@restatedev/restate" : " ^0.8.0" ,
19
- "@restatedev/restate-server" : " ^0.8.0" ,
18
+ "@restatedev/restate" : " ^0.9.2" ,
19
+ "@restatedev/restate-server" : " ^0.9.2" ,
20
+ "@types/node" : " ^20.12.7" ,
20
21
"ts-node" : " ^10.9.2" ,
21
22
"ts-node-dev" : " ^2.0.0" ,
22
23
"typescript" : " ^5.0.2"
Original file line number Diff line number Diff line change 19
19
"@restatedev/restate-sdk" : " ^0.9.2"
20
20
},
21
21
"devDependencies" : {
22
- "@restatedev/restate" : " 0.8.0 " ,
22
+ "@restatedev/restate" : " ^0.9.2 " ,
23
23
"@typescript-eslint/eslint-plugin" : " ^6.3.0" ,
24
24
"@typescript-eslint/parser" : " ^6.3.0" ,
25
+ "@types/node" : " ^20.12.7" ,
25
26
"eslint" : " ^8.46.0" ,
26
27
"prettier" : " ^2.8.8" ,
27
28
"ts-node-dev" : " ^2.0.0"
You can’t perform that action at this time.
0 commit comments