diff --git a/llms-full.txt b/llms-full.txt index a210426e..3dac2d67 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -21965,6 +21965,12 @@ const client = new Client({ }); ``` +Without a `token`, the client reads `QSTASH_TOKEN` and `QSTASH_URL` from the environment and only warns when they are missing. Use `Client.fromEnv()` to throw instead: + +```typescript +const client = Client.fromEnv(); +``` + #### RetryConfig You can configure the retry policy of the client by passing the configuration to the client constructor. diff --git a/qstash/sdks/ts/gettingstarted.mdx b/qstash/sdks/ts/gettingstarted.mdx index f0d4ffa1..2da3bad4 100644 --- a/qstash/sdks/ts/gettingstarted.mdx +++ b/qstash/sdks/ts/gettingstarted.mdx @@ -24,6 +24,12 @@ const client = new Client({ }); ``` +Without a `token`, the client reads `QSTASH_TOKEN` and `QSTASH_URL` from the environment and only warns when they are missing. Use `Client.fromEnv()` to throw instead: + +```typescript +const client = Client.fromEnv(); +``` + #### RetryConfig You can configure the retry policy of the client by passing the configuration to the client constructor.