-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the greeting app that uses guestbook to demos (#170)
The last link in the doc points to github... why not.
- Loading branch information
Showing
20 changed files
with
1,914 additions
and
1,370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
greeting-emails/migrations/20240212161006_create_dbos_hello_tables.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# DBOS Guestbook Hello App | ||
|
||
This is the app described in the [DBOS Programming Guide](https://docs.dbos.dev/getting-started/quickstart-programming) | ||
|
||
## Getting Started | ||
|
||
First, install all the app dependencies | ||
```bash | ||
npm install | ||
``` | ||
|
||
Start the database. You can use any Postgres DB. If you don't have one, we've provided a script that starts Postgres locally in a Docker container and creates a database: | ||
|
||
```bash | ||
export PGPASSWORD=dbos #set PGPASSWORD=dbos on Windows | ||
node start_postgres_docker.js | ||
``` | ||
|
||
Then, create some database tables. | ||
|
||
```bash | ||
npx dbos migrate | ||
``` | ||
|
||
Then, visit the guestbook key generator at [https://demo-guestbook.cloud.dbos.dev/key](https://demo-guestbook.cloud.dbos.dev/key) and save your key to `dbos-config.yaml` | ||
|
||
Next, build and run the app: | ||
|
||
```bash | ||
npm run build | ||
npx dbos start | ||
``` | ||
|
||
Finally, curl the server to see that it's working! | ||
|
||
```bash | ||
curl http://localhost:3000/greeting/dbos | ||
``` | ||
|
||
## Learn More | ||
|
||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
greeting-guestbook/migrations/20240212161006_create_greetings_table.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
exports.up = function(knex) { | ||
return knex.schema.createTable('greetings', table => { | ||
table.text('name'); | ||
table.text('note'); | ||
}); | ||
}; | ||
|
||
exports.down = function(knex) { | ||
return knex.schema.dropTable('greetings'); | ||
}; | ||
|
Oops, something went wrong.