Replies: 2 comments 1 reply
-
Bref has two pages of documentation regarding local development:
You can also checkout the Bref dev-server repo: https://github.com/brefphp/dev-server Does this help you? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've read through both of those docs, but they only offer how to test 1) event driven invokes, and 2) direct http requests to the handler (bypassing bref). I've tried this running spinning up Docker and running this in a test: $event = json_decode(file_get_contents(__DIR__ . '/fixtures/request.json'), TRUE);
$handler = new FpmHandler('index.php');
$handler->start();
$invoker = new Invoker;
$context = new Context('test', 0, '', '');
$result = $invoker->invoke($handler, $event, $context);
$handler->stop(); However, I get:
Because FPM is already running in the container. For some reason I can't seem to kill the process. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I currently use bref for a Lambda function that is exposed via a Function URL. I can test my function locally by running a local php server and sending a Curl request directly to my handler script. However, this bypasses all of bref's response handling.
Is it possible to locally invoke the Lambda function in a way that routes the request through bref?
Beta Was this translation helpful? Give feedback.
All reactions