Menu

Start Dynoxide from PHP, Laravel and Node tests
📰

Start Dynoxide from PHP, Laravel and Node tests

DEV Community: laravel·Martin Hicks·12 days ago
#OgadlNUi
#devtolaravel#devto#dev#dynoxide#port
Long article (1251 words) — no AI summary yet.
Reading 0:00
15s threshold

I want Dynoxide to be as easy to use as I can make it, in your tests and when you're developing locally. 1.7.0 and 1.8.0 are mostly about that. You can now start it from a Node, PHP or Laravel test suite without writing any process handling, and give it a fixed port when something else needs to know where it is. 1.7.0 went out on the 17th and 1.8.0 on the 20th. I've rolled them into one post because they're one piece of work.

Two new flags

Everything else sits on two flags that 1.7.0 added to the binary.

--ready-json prints a single line of JSON once the server can take requests, with the endpoint, port and process ID in it. Whatever started the server reads that line and knows it can go, so there's nothing to guess. Pair it with --port 0 and the operating system picks a free port, so parallel test runs never fight over 8000.

--exit-with-parent shuts the server down cleanly when its stdin closes.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.