You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are interested in learning more about declarative security in DBOS, please read our [Authentication and Authorization](https://docs.dbos.dev/tutorials/authentication-authorization) tutorial.
371
+
If you are interested in learning more about declarative security in DBOS, please read our [Authentication and Authorization](https://docs.dbos.dev/typescript/tutorials/crosscutting/authentication-authorization) tutorial.
372
372
373
373
## Deploying to DBOS Cloud
374
374
We can make some quick changes to deploy the DBOS Bank backend in the cloud, using the free "DBOS Starter" hosting tier.
@@ -444,12 +444,14 @@ This demo is time sensitive as you'll have a 10-second sleep window to crash Ban
444
444
5. In the log for the app, you should see the failed transfer. The 10 `Sleeping` statements, interrupted by a crash, then restart, workflow recovery and finally the "transaction reversed" error message.
445
445
446
446
## Further Reading
447
-
To get started with DBOS Transact, check out the [quickstart](https://docs.dbos.dev/getting-started/quickstart) and [docs](https://docs.dbos.dev/).
447
+
- To start a DBOS app from a template, visit our [quickstart](https://docs.dbos.dev/quickstart).
448
+
- For DBOS Transact programming tutorials, check out our [programming guide](https://docs.dbos.dev/typescript/programming-guide).
449
+
- To learn more about DBOS, take a look at [our documentation](https://docs.dbos.dev/) or our [source code](https://github.com/dbos-inc/dbos-transact).
448
450
449
-
DBOS [concepts](https://docs.dbos.dev/explanations/core-concepts) and their execution guarantees covered in depth in the [workflow tutorial](https://docs.dbos.dev/tutorials/workflow-tutorial).
451
+
DBOS [concepts](https://docs.dbos.dev/explanations/how-workflows-work) and their execution guarantees are covered in depth in the [workflow tutorial](https://docs.dbos.dev/typescript/tutorials/workflow-tutorial).
450
452
451
-
For a quick introduction to [DBOS Cloud](https://www.dbos.dev/dbos-cloud), see [the tutorials](https://docs.dbos.dev/category/dbos-cloud-tutorials). Of particular interest is the [DBOS Cloud Monitoring Dashboard](https://docs.dbos.dev/cloud-tutorials/monitoring-dashboard).
453
+
For a quick introduction to [DBOS Cloud](https://www.dbos.dev/dbos-cloud), see [the tutorials](https://docs.dbos.dev/quickstart). Of particular interest is the [DBOS Cloud Monitoring Dashboard](https://docs.dbos.dev/cloud-tutorials/monitoring-dashboard).
452
454
453
-
For more information on [Prisma](https://www.prisma.io) as an ORM in DBOS, see [Using Prisma](https://docs.dbos.dev/tutorials/using-prisma).
455
+
For more information on [Prisma](https://www.prisma.io) as an ORM in DBOS, see [Using Prisma](https://docs.dbos.dev/typescript/tutorials/orms/using-prisma).
454
456
455
-
If you are interested in learning more about declarative security in DBOS, please read our [Authentication and Authorization](https://docs.dbos.dev/tutorials/authentication-authorization) tutorial.
457
+
If you are interested in learning more about declarative security in DBOS, please read our [Authentication and Authorization](https://docs.dbos.dev/typescript/tutorials/crosscutting/authentication-authorization) tutorial.
When a payment is submitted, your shopping cart is cleared automatically.
80
80
81
81
## Deploying the Demo to the Cloud
82
-
> **💡 Tip:** If you have not yet read the [DBOS Cloud Quickstart](https://docs.dbos.dev/getting-started/quickstart-cloud) or the
83
-
> [DBOS Cloud Tutorials](https://docs.dbos.dev/category/dbos-cloud-tutorials) it may be a good idea to do so.
82
+
> **💡 Tip:** If you have not yet read the [DBOS Cloud Quickstart](https://docs.dbos.dev/quickstart) it may be a good idea to do so.
84
83
85
84
### Deploying the Payment Backend
86
85
The following steps are necessary to deploy the payment backend to the DBOS Cloud:
@@ -121,7 +120,7 @@ The Shop frontend can also be deployed to a Next.js hosting environment, such as
121
120
122
121
### Retrieving Status and Logs
123
122
Once you have deployed the shop to the cloud and placed a few orders, try out some of the cloud administration and monitoring commands.
124
-
(See the [tutorial](https://docs.dbos.dev/category/dbos-cloud-tutorials) or the [CLI reference](https://docs.dbos.dev/api-reference/cloud-cli) for more information.)
123
+
(See the [tutorial](https://docs.dbos.dev/quickstart) or the [CLI reference](https://docs.dbos.dev/cloud-tutorials/cloud-cli) for more information.)
125
124
126
125
Check the application status and logs from either the `e-commerce/payment-backend` or `e-commerce/shop-backend` directories by excuting DBOS Cloud CLI commands, such as:
127
126
* `npx dbos-cloud app status` - Provide a summary of the app, its database server, whether it is available, and if so, the app's URL
@@ -152,21 +151,21 @@ Provenance data is automatically captured by DBOS Cloud during workflow executio
152
151
153
152
> Tips:
154
153
> * The "DBOS Time Travel Debugger" extension must be installed. Sometimes restarting Visual Studio Code is necessary.
155
-
> * Detailed information and instructions can be found in the [Time Travel Debugger](https://docs.dbos.dev/api-reference/time-travel-debugger) reference.
154
+
> * Detailed information and instructions can be found in the [Time Travel Debugger](https://docs.dbos.dev/typescript/reference/tools/time-travel-debugger) reference.
156
155
> * Visual Studio Code should be open to the folder of the application you want to debug, not a child or parent folder. This allows the extension to find the application configuration and use the saved app credentials to access DBOS Cloud.
157
156
> * If the extension reports an error, review the logs that can be seen under "View"->"Output"->"DBOS" and "DBOS Debug Proxy".
158
157
> * The Debugger extension needs the database password to retrieve a snapshot of data for debugging. If the password needs to be changed, select "View"->"Command Palette..." and click "DBOS: Delete Stored Application Datbase Passwords" and try debugging again.
159
158
> * Debugging sessions are often more interesting if a breakpoint is set prior to launch. (Otherwise execution will replay and the debugging session will quickly end.)
160
159
161
160
## Under the Covers
162
161
163
-
> Note, this section assumes you have read at least the [DBOS Getting Started docs](https://docs.dbos.dev/category/getting-started).
162
+
> Note, this section assumes you have read at least the [DBOS Getting Started docs](https://docs.dbos.dev/quickstart).
164
163
165
-
Each backend package in this demo has a single [reliable workflow](https://docs.dbos.dev/tutorials/workflow-tutorial) at its core.
164
+
Each backend package in this demo has a single [reliable workflow](https://docs.dbos.dev/typescript/tutorials/workflow-tutorial) at its core.
166
165
The following sections show the code for that workflow, along with detailed notes regarding how it works.
167
-
Each package also has [transaction](https://docs.dbos.dev/tutorials/transaction-tutorial),
and [handler](https://docs.dbos.dev/typescript/tutorials/requestsandevents/http-serving-tutorial) functions.
170
169
These functions are fairly straightforward, please see the source code for more details.
171
170
172
171
### Shop paymentWorkflow
@@ -196,7 +195,7 @@ DBOS workflows must be decorated with `@DBOS.workflow()`.
196
195
```
197
196
198
197
The workflow starts off with some basic database operations.
199
-
Each of these database operations is implemented via a [transaction function](https://docs.dbos.dev/tutorials/transaction-tutorial).
198
+
Each of these database operations is implemented via a [transaction function](https://docs.dbos.dev/typescript/tutorials/transaction-tutorial).
200
199
The workflow retrieves the user's shopping cart, creates an order from cart items and subtracts the items from inventory.
201
200
If there are no items in the cart or there isn't sufficient inventory to fulfill the order, the workflow fails.
202
201
The `setEvent` call in the failure paths will be described shortly.
@@ -213,7 +212,7 @@ a payment session and get a payment redirection URL.
213
212
}
214
213
```
215
214
216
-
Assuming the order can be fulfilled, `paymentWorkflow` calls out to the payment provider via a [step](https://docs.dbos.dev/tutorials/communicator-tutorial).
215
+
Assuming the order can be fulfilled, `paymentWorkflow` calls out to the payment provider via a [step](https://docs.dbos.dev/typescript/tutorials/step-tutorial).
217
216
In a real-world shop using a real-world payment provider such as Stripe, `createPaymentSession` would likely use a client SDK from the payment provider.
218
217
Since this is a demo, raw `fetch` calls are used instead.
219
218
@@ -228,7 +227,7 @@ We do this by calling `setEvent` to communicate out to the host environment and
The `webCheckout` [Http handler](https://docs.dbos.dev/tutorials/http-serving-tutorial) function that called `paymentWorkflow`
230
+
The `webCheckout` [Http handler](https://docs.dbos.dev/typescript/tutorials/requestsandevents/http-serving-tutorial) function that called `paymentWorkflow`
232
231
uses `getEvent` to wait for the `paymentWorkflow` to provide the payment redirection URL.
233
232
234
233
```ts
@@ -248,7 +247,7 @@ If the payment session doesn't get created, `paymentWorkflow` sends a null value
248
247
249
248
Note that even though the `webCheckout` function will complete and return after receiving the event, the `paymentWorkflow` is still running.
250
249
It is waiting on a `checkout_complete_topic` message before continuing.
251
-
For more on events and messages, please see [Workflow Communications](https://docs.dbos.dev/tutorials/workflow-communication-tutorial)
250
+
For more on events and messages, please see [Workflow Communications](https://docs.dbos.dev/typescript/tutorials/workflow-tutorial#workflow-events)
@@ -350,16 +349,15 @@ They also provide a [Docker image](https://openapi-generator.tech/docs/installat
350
349
## Unit Testing in DBOS
351
350
352
351
The e-commerce example application demonstrates a number of techniques for testing DBOS application logic before deployment.
353
-
For more information on testing in DBOS, see the [Testing and Debugging](https://docs.dbos.dev/tutorials/testing-tutorial) tutorial and [DBOS Testing Runtime](https://docs.dbos.dev/api-reference/testing-runtime) reference.
352
+
For more information on testing in DBOS, see the [Testing and Debugging](https://docs.dbos.dev/typescript/tutorials/development/testing-tutorial) tutorial.
354
353
355
354
### Testing Techniques
356
355
357
356
The `payment-backend` project uses:
358
357
* The [`jest`](https://jestjs.io/) testing framework for defining test suites (setup, teardown, and tests) and reporting test results.
359
-
* The [DBOS Testing Runtime](https://docs.dbos.dev/api-reference/testing-runtime), which permits "clear-box" testing of the application logic.
360
-
*[`supertest`](https://github.com/ladjs/supertest) executed against [`testRuntime.getHandlersCallback()`](https://docs.dbos.dev/api-reference/testing-runtime#runtimegethandlerscallback) to test HTTP handling logic in combination with the DBOS-based application code.
361
-
*`testRuntime.send` and `testRuntime.retrieveWorkflow` to examine and interact with the workflow under test.
362
-
*`testRuntime.setConfig` to set [application configuration](https://docs.dbos.dev/api-reference/configuration/#application) items, allowing the resulting behavior to be unit-tested.
358
+
*[`supertest`](https://github.com/ladjs/supertest) executed against [`DBOS.getHTTPHandlersCallback()`](https://docs.dbos.dev/typescript/reference/transactapi/dbos-class#http-testing) to test HTTP handling logic in combination with the DBOS-based application code.
359
+
*`DBOS.send` and `DBOS.retrieveWorkflow` to examine and interact with the workflow under test.
360
+
*`DBOS.setConfig` to set [application configuration](https://docs.dbos.dev/typescript/reference/configuration#application) items, allowing the resulting behavior to be unit-tested.
363
361
364
362
The `shop-backend` project uses a few additional testing techniques:
365
363
* Using `testRuntime.invoke` to call application functions without creating HTTP-style requests (via `supertest`).
Copy file name to clipboardexpand all lines: typescript/websockets/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Websockets samples
2
2
3
-
The sample takes the application generated in the [DBOS quick start](https://docs.dbos.dev/getting-started/quickstart) and adds a websocket endpoint to it.
3
+
The sample takes the application generated in the [DBOS quick start](https://docs.dbos.dev/quickstart) and adds a websocket endpoint to it.
4
4
5
5
## Code
6
6
@@ -18,7 +18,7 @@ to receive data from the server.
18
18
19
19
## Deploying the service
20
20
21
-
Follow the instructions in the [quickstart](https://docs.dbos.dev/getting-started/quickstart) to deploy the app either to the cloud or run locally.
21
+
Follow the instructions in the [quickstart](https://docs.dbos.dev/quickstart) to deploy the app either to the cloud or run locally.
Copy file name to clipboardexpand all lines: typescript/widget-store/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The Server Tools section give you an opportunity to crash the app. After crashin
27
27
28
28
## Nightly Sales Reports (Optional)
29
29
30
-
As per [this blog post](https://www.dbos.dev/blog/how-to-build-cloud-cron-jobs), the DBOS Widget Store can send out nightly email sales reports, illustrating [scheduled workflows](https://docs.dbos.dev/typescript/tutorials/scheduled-workflows) and an [email library](https://www.npmjs.com/package/@dbos-inc/dbos-email-ses).
30
+
As per [this blog post](https://www.dbos.dev/blog/how-to-build-cloud-cron-jobs), the DBOS Widget Store can send out nightly email sales reports, illustrating [scheduled workflows](https://docs.dbos.dev/typescript/tutorials/requestsandevents/scheduled-workflows) and an [email library](https://www.npmjs.com/package/@dbos-inc/dbos-email-ses).
31
31
32
32
To enable the features, set up your email accounts in [SES](https://us-east-2.console.aws.amazon.com/ses/home) and then set the following environment variables before launching the widget store:
0 commit comments