From 8eb5d91aa74b4ab6e72b253eadbb5e484058bcd5 Mon Sep 17 00:00:00 2001 From: Afzal Ansari Date: Thu, 21 Dec 2023 06:34:20 +0000 Subject: [PATCH] foirmats the structure --- docs/pages/env-vars-config.md | 21 +++++++++++---------- docs/pages/function-lifecycle-events.md | 3 ++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/pages/env-vars-config.md b/docs/pages/env-vars-config.md index 3446e43f5..f6e3176e3 100644 --- a/docs/pages/env-vars-config.md +++ b/docs/pages/env-vars-config.md @@ -8,9 +8,9 @@ weight: 50 Glee provides a few environment variables for you to customize the Glee application's behavior according to your specific requirements: |Variable|Description|Example| |---|---|---| -|GLEE_SERVER_NAMES|A comma-separated list of the servers to load on startup.|`GLEE_SERVER_NAMES=websockets,mosquitto` -|GLEE_SERVER_CERTS|A comma-separated list of `${serverName}:${pathToCertificateFile}`. These are the certificates to use when establishing the connection to the given server.|`GLEE_SERVER_CERTS=mosquitto:mosquitto.org.crt` -|GLEE_SERVER_VARIABLES|A comma-separated list of `${serverName}:${serverVariable}:${value}`. These are the values to use for each server variable.|`GLEE_SERVER_VARIABLES=websockets:namespace:public` +|GLEE_SERVER_NAMES|A comma-separated list of the servers to load on startup.|`GLEE_SERVER_NAMES=websockets,mosquitto`| +|GLEE_SERVER_CERTS|A comma-separated list of `${serverName}:${pathToCertificateFile}`. These are the certificates to use when establishing the connection to the given server.|`GLEE_SERVER_CERTS=mosquitto:mosquitto.org.crt`| +|GLEE_SERVER_VARIABLES|A comma-separated list of `${serverName}:${serverVariable}:${value}`. These are the values to use for each server variable.|`GLEE_SERVER_VARIABLES=websockets:namespace:public`| ## Configuring Glee @@ -111,13 +111,14 @@ Inside the return statement, you can specify the following options: These configurations apply to Glee itself, rather than any specific protocol. |Field|Default|Description| |--|--|--| -|glee.gleeDir|`.glee`|Sets the Glee directory. Your sources will be compiled here.| -|glee.lifecycleDir|`lifecycle`|Path to the directory that stores your [lifecycle events](./lifecycle-events.md).| -|glee.functionsDir|`functions`| Path to the directory that stores your [functions](./functions.md).| -|glee.asyncapiFilePath|`asyncapi.(yaml \| yml \| json)`| Path to your AsyncAPI file. | -|glee.logs| | glee logs channel and payload by default. you can change this behaviour for incoming and outgoing messages. | -|glee.logs.incoming| "all" | supported values are `channel-only` and `none`. | -|glee.logs.outgoing| "all" | supported values are `channel-only` and `none`. | +|glee.gleeDir|`.glee`|Sets the Glee directory. Your sources will be compiled here. +|glee.lifecycleDir|`lifecycle`|Path to the directory that stores your [lifecycle events](./lifecycle-events.md). +|glee.functionsDir|`functions`| Path to the directory that stores your [functions](./functions.md). +|glee.asyncapiFilePath|`asyncapi.(yaml \| yml \| json)`| Path to your AsyncAPI file. +|glee.logs| default | glee logs channel and payload by default. you can change this behaviour for incoming and outgoing messages. +|glee.logs.incoming| "all" | Supported values are `channel-only` and `none`. +|glee.logs.outgoing| "all" | Supported values are `channel-only` and `none`. + #### Generating Documentation |Field|Description| |--|--| diff --git a/docs/pages/function-lifecycle-events.md b/docs/pages/function-lifecycle-events.md index 3f6e78109..25a586d42 100644 --- a/docs/pages/function-lifecycle-events.md +++ b/docs/pages/function-lifecycle-events.md @@ -20,6 +20,7 @@ Functions take a single argument, which is the event received from a broker or a |headers|The headers/metadata of the received event. |channel|The name of the channel/topic from which the event was read. |serverName|The name of the server/broker from which the event was received. + Functions may return an object to tell Glee what to do next. For instance, the following example greets the user back: ```js /* onHello.js */ @@ -75,7 +76,7 @@ export default async function ({ export const lifecycleEvent = 'onConnect' ``` -Each file in the `lifecycle` directory must export a default async function and the `lifecycleEvent` field, which is the [name of the event](#list-of-events) you want to subscribe to. Optionally, your function can return an object following exactly the same syntax [as described in the functions documentation](functions.md). +Each file in the `lifecycle` directory must export a default async function and the `lifecycleEvent` field, which is the [name of the event](#list-of-events) you want to subscribe to. Optionally, your function can return an object following exactly the same syntax as described above in the functions definition. ## List of events