Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TS Tour of Restate #94

Merged
merged 4 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
typescript-hello-world-lambda-cdk.zip
typescript-dynamic-workflow-executor.zip
typescript-end-to-end-testing.zip
typescript-tour-of-restate.zip
java-hello-world-http.zip
java-hello-world-lambda.zip
java-food-ordering.zip
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Browse this repository to see how easy distributed applications development beco
| Kotlin | [Hello world on AWS Lambda](kotlin/hello-world-lambda) |
| Kotlin | [Hello world on AWS Lambda + CDK](kotlin/hello-world-lambda-cdk) |

## Tutorials

| Language | Name / Link |
|-------------|-----------------------------------------------------------------------------------------------|
| TypeScript | [Tour of Restate](typescript/tour-of-restate): A tour of the essentials of the Typescript SDK |

## Patterns

| Language | Name / Link |
Expand Down
3 changes: 2 additions & 1 deletion scripts/prepare_release_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ create_release_zip typescript ecommerce-store
create_release_zip typescript food-ordering
create_release_zip typescript payment-api
create_release_zip typescript ticket-reservation
create_release_zip typescript dynamic-workflow-executor
create_release_zip typescript dynamic-workflow-executor
create_release_zip typescript tour-of-restate
6 changes: 6 additions & 0 deletions typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ This directory contains Restate examples using the Typescript SDK.
| TypeScript| [Hello world on AWS Lambda](hello-world-lambda) |
| TypeScript| [Hello world on AWS Lambda + CDK](hello-world-lambda-cdk) |

## Tutorials

| Language | Name / Link |
|-------------|------------------------------------------------------------------------------------|
| TypeScript | [Tour of Restate](tour-of-restate): A tour of the essentials of the Typescript SDK |

## Patterns

| Language | Name / Link |
Expand Down
2 changes: 2 additions & 0 deletions typescript/tour-of-restate/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
17 changes: 17 additions & 0 deletions typescript/tour-of-restate/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-unused-vars": "off"
}
}
43 changes: 43 additions & 0 deletions typescript/tour-of-restate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# A Tour of Restate with TypeScript

Restate is a system for easily building resilient applications using **distributed durable RPC & async/await**.

This example contains the code for the `Tour of Restate` tutorial, for the Typescript Handler API.
This tutorial takes your through key Restate features by developing an end-to-end ticketing app.

❓ Learn more about Restate from the [Restate documentation](https://docs.restate.dev).

## Download the example

- Via the CLI:
```shell
restate example typescript-tour-of-restate && cd typescript-tour-of-restate
```

- Via git clone:
```shell
git clone [email protected]:restatedev/examples.git
cd examples/typescript/tour-of-restate
```

- Via `wget`:
```shell
wget https://github.com/restatedev/examples/releases/latest/download/typescript-tour-of-restate.zip && unzip typescript-tour-of-restatezip -d typescript-tour-of-restate && rm typescript-tour-of-restate.zip
```
## Running the example

Have a look at the [Tour of Restate tutorial](https://docs.restate.dev/tour) in the documentation to build and run the application in this repository.

In short, you can run the different parts of the code via:

```
npm install
npm run build
npm run app
npm run part1
npm run part2
npm run part3
npm run part4
```

An SDK upgrade warrants a new release.
Loading
Loading