@dbos-inc/dbos-sdk 0.13.3-preview → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -5
- package/dist/src/dbos-runtime/init.js +2 -2
- package/dist/src/dbos-runtime/init.js.map +1 -1
- package/dist/src/debugger/debug_workflow.d.ts.map +1 -1
- package/dist/src/debugger/debug_workflow.js +4 -2
- package/dist/src/debugger/debug_workflow.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/examples/hello/README.md +17 -16
- package/package.json +1 -1
package/examples/hello/README.md
CHANGED
@@ -1,25 +1,27 @@
|
|
1
1
|
# DBOS Hello
|
2
2
|
|
3
|
-
This is a [DBOS app](https://docs.dbos.dev/) bootstrapped with `dbos init`.
|
3
|
+
This is a [DBOS app](https://docs.dbos.dev/) bootstrapped with `npx @dbos-inc/dbos-sdk init`.
|
4
4
|
|
5
5
|
## Getting Started
|
6
6
|
|
7
|
-
|
8
|
-
DBOS
|
7
|
+
Before you can launch your app, you need a database.
|
8
|
+
DBOS works with any Postgres database, but to make things easier, we've provided a script that starts a Docker Postgres container and creates a database:
|
9
9
|
|
10
10
|
```bash
|
11
11
|
export PGPASSWORD=dbos
|
12
12
|
./start_postgres_docker.sh
|
13
13
|
```
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
If successful, the script should print `Database started successfully!`.
|
16
|
+
|
17
|
+
Then, let's run a schema migration to create some tables:
|
18
18
|
|
19
19
|
```bash
|
20
|
-
npx
|
20
|
+
npx dbos-sdk migrate
|
21
21
|
```
|
22
22
|
|
23
|
+
If successful, the migration should print `Migration successful!`.
|
24
|
+
|
23
25
|
Next, build and run the app:
|
24
26
|
|
25
27
|
```bash
|
@@ -27,15 +29,14 @@ npm run build
|
|
27
29
|
npx dbos-sdk start
|
28
30
|
```
|
29
31
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
curl http://localhost:3000/greeting/dbos
|
34
|
-
```
|
32
|
+
To see that it's working, visit this URL in your browser: [`http://localhost:3000/greeting/dbos`](http://localhost:3000/greeting/dbos).
|
33
|
+
You should get this message: `Hello, dbos! You have been greeted 1 times.`
|
34
|
+
Each time you refresh the page, the counter should go up by one!
|
35
35
|
|
36
|
-
You
|
37
|
-
We can help you get started in our [programming quickstart](https://docs.dbos.dev/getting-started/quickstart-programming-1).
|
36
|
+
Congratulations! You just launched a DBOS application.
|
38
37
|
|
39
|
-
##
|
38
|
+
## Next Steps
|
40
39
|
|
41
|
-
To
|
40
|
+
- To add more functionality to this application, modify `src/operations.ts`, then re-build and re-start it. For a detailed tutorial, check out our [programming quickstart](https://docs.dbos.dev/getting-started/quickstart-programming).
|
41
|
+
- To learn how to deploy your application to DBOS Cloud, visit our [cloud quickstart](https://docs.dbos.dev/getting-started/quickstart-cloud/)
|
42
|
+
- 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-sdk).
|