Skip to content

Commit 761b562

Browse files
committed
Add advanced server example for Guacamole-Lite with session recording, webhooks, and error tracking
1 parent 3f015e6 commit 761b562

File tree

3 files changed

+401
-0
lines changed

3 files changed

+401
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,19 @@ Each section provides detailed information and examples to help you tailor `guac
331331
Whether you're integrating with existing Node.js frameworks, handling complex logging requirements, or setting up custom
332332
callbacks and events, the advanced configuration guide has you covered.
333333

334+
## Production-Ready Example
335+
336+
For enterprise or production environments, we provide a comprehensive example that demonstrates advanced features often
337+
required in real-world deployments. This example includes:
338+
339+
* **Session Recording & Cloud Upload**: Automatically compressing session recordings and uploading them to AWS S3.
340+
* **Error Tracking**: Integration with Sentry for centralized error monitoring.
341+
* **Webhooks**: HTTP callbacks triggered on session open, close, and recording save events.
342+
* **Graceful Shutdown**: Proper handling of system signals to close connections cleanly.
343+
* **Dynamic Configuration**: Using token data to dynamically configure file paths.
344+
345+
Check out [examples/advanced_server.js](examples/advanced_server.js) for the complete implementation.
346+
334347
## Testing
335348

336349
`guacamole-lite` comes with two ways to test:

docs/advanced-configuration.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- [Integration with Node.js Frameworks](#integration-with-nodejs-frameworks)
2626
- [Considerations for Integration](#considerations-for-integration)
2727
- [Example of Integrating with Express.js](#example-of-integrating-with-expressjs)
28+
- [Comprehensive Production Example](#comprehensive-production-example)
2829
- [Additional Examples and Resources](#additional-examples-and-resources)
2930
- [Contents of the Examples Directory](#contents-of-the-examples-directory)
3031

@@ -1049,6 +1050,20 @@ similar framework, allowing you to leverage the full capabilities of both `guaca
10491050

10501051
---
10511052

1053+
## Comprehensive Production Example
1054+
1055+
The `examples/advanced_server.js` file provides a blueprint for a robust production server. It goes beyond simple
1056+
configuration and implements custom logic for:
1057+
1058+
1. **Cloud Storage**: Compressing raw recording files generated by guacd and uploading them to S3.
1059+
2. **Monitoring**: Sending error reports to Sentry with user context.
1060+
3. **Integrations**: Triggering webhooks on your backend when sessions open or close.
1061+
4. **Operational Safety**: Handling process signals for graceful shutdowns.
1062+
1063+
For details on how to implement these features, review the [Advanced Server Example](../examples/advanced_server.js).
1064+
1065+
---
1066+
10521067
## Additional Examples and Resources
10531068

10541069
For developers looking to dive deeper into the practical implementation of `guacamole-lite`, the project's `examples`
@@ -1065,6 +1080,8 @@ The `examples` directory within the `guacamole-lite` project contains the follow
10651080
- [basic_server.js](../examples/basic_server.js): Provides a simple example of how to get a `guacamole-lite` server up
10661081
and running with minimal
10671082
configuration.
1083+
- [advanced_server.js](../examples/advanced_server.js): A comprehensive production-ready server implementation featuring
1084+
S3 recording upload, Sentry error tracking, webhooks, and graceful shutdown.
10681085
- [encrypt_token.js](../examples/encrypt_token.js): Shows how to encrypt a connection token using Node.js, ensuring
10691086
secure transmission of connection
10701087
parameters.

0 commit comments

Comments
 (0)