From f0c6bb5c4bc1d5b823c12032f507c22784d322bc Mon Sep 17 00:00:00 2001 From: maxdml Date: Sat, 20 Apr 2024 06:09:42 -0700 Subject: [PATCH 1/4] fix indentation in quickstart --- docs/getting-started/quickstart-programming.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/getting-started/quickstart-programming.md b/docs/getting-started/quickstart-programming.md index c04c0353..01352b65 100644 --- a/docs/getting-started/quickstart-programming.md +++ b/docs/getting-started/quickstart-programming.md @@ -123,12 +123,12 @@ import { import { Knex } from "knex"; export class Greetings { - @Communicator() - static async SendGreetingEmail(ctxt: CommunicatorContext, friend: string, content: string) { - ctxt.logger.info(`Sending email "${content}" to ${friend}...`); - // Code omitted for simplicity - ctxt.logger.info("Email sent!"); - } + @Communicator() + static async SendGreetingEmail(ctxt: CommunicatorContext, friend: string, content: string) { + ctxt.logger.info(`Sending email "${content}" to ${friend}...`); + // Code omitted for simplicity + ctxt.logger.info("Email sent!"); + } @Transaction() static async InsertGreeting(ctxt: TransactionContext, friend: string, content: string) { From afddf1c5a17547a04f112cff47288fd1b740535c Mon Sep 17 00:00:00 2001 From: maxdml Date: Tue, 23 Apr 2024 13:53:47 -0700 Subject: [PATCH 2/4] update docs to reflect changes to entrypoints --- docs/api-reference/cli.md | 18 ++++++++---------- docs/api-reference/configuration.md | 7 ++++--- .../application-structure-explanation.md | 9 +-------- docs/tutorials/openapi-tutorial.md | 12 ++++++------ 4 files changed, 19 insertions(+), 27 deletions(-) diff --git a/docs/api-reference/cli.md b/docs/api-reference/cli.md index cac65c8f..740c933a 100644 --- a/docs/api-reference/cli.md +++ b/docs/api-reference/cli.md @@ -12,17 +12,16 @@ The DBOS Transact CLI helps you run applications locally. ### `npx dbos start` -**Description:** +**Description:** This command launches the DBOS Transact runtime and HTTP server to serve an application. -It registers all functions and serves all endpoints in classes exported from the specified entrypoint file (typically `src/operations.ts`). +It registers all functions and serves all endpoints in classes exported by the [declared entrypoint files](./configuration#runtime) (`src/operations.ts` by default). Parameters set from the command line take precedence over parameters set in the [configuration file](./configuration). You must compile your code (`npm run build`) before running this command. -**Parameters:** +**Parameters:** - `-p, --port `: The port on which to serve your functions. - `-l, --loglevel `: The severity of log entries emitted. Can be one of `debug`, `info`, `warn`, `error`, `emerg`, `crit`, `alert`. - `-c, --configfile `: The path to a YAML [configuration file](./configuration) to use. -- `-e, --entrypoint `: The path to an [entrypoint file](./configuration) to use. --- @@ -31,10 +30,10 @@ You must compile your code (`npm run build`) before running this command. **Synonyms** `npm create @dbos-inc` and `npm init @dbos-inc` are synonyms for `npx @dbos-inc/create`. When using `npm create @dbos-inc` with any of the command line switches below, be sure to use `--` to separate `npm` arguments from the arguments intended for `@dbos-inc/create`. -**Description:** +**Description:** This command initializes a new DBOS application from a template into a target directory. By default, it instantiates the "Hello, Database!" application used in the [quickstart](../getting-started/quickstart). -**Parameters:** +**Parameters:** - `-n, --appName `: The name and directory to which to instantiate the application. Application names should be between 3 and 30 characters and must contain only lowercase letters and numbers, dashes (`-`), and underscores (`_`). - `-t, --templateName