#Can Nightwatch work in a serverless environment - lambda aws (bref)

2 messages · Page 1 of 1 (latest)

rose stump
#

Hi everyone, I need your help with a question.

I’d like to use the Nightwatch package in my Laravel app, which is deployed using Bref (serverless on AWS Lambda). However, I’m not sure if they are compatible.

From what I understand, Nightwatch uses an in-memory buffer (an array) to collect up to 500 events before sending them to the Nightwatch dashboard. Given that serverless functions like Lambda are stateless and don't persist memory between invocations, I’m concerned this buffer won’t work properly, meaning the package may not function as intended.

Has anyone successfully used Nightwatch with Bref or a serverless environment? Any insights or suggestions would be appreciated!

hollow portal
#

Nightwatch is essentially a log driver, so you can run it as an external log driver, to which your application sends all the events.
See for example how you can set it up with Vapor; https://nightwatch.laravel.com/docs/guides/vapor (which is also a serverless platform)