Run on another port
← All configuration scenariosYou have a development app on port 8080 and want a second server for testing. This profile starts Mini4Work on port 9000 with one worker. The default loopback address keeps the listener local to your machine.
Choose the port
In the application with mini4work/webserver installed, save this as local.json beside vendor/.
{
"listen": { "port": 9000 },
"workers": { "count": 1 }
}php vendor/mini4work/webserver/examples/server.php local.jsonCheck the listener
curl -i http://127.0.0.1:9000/helloExpect HTTP 200 and a JSON response containing "path": "/hello". Repeated requests show the same worker_pid until that worker rotates. If the port is occupied, choose another free port in the profile and use it in the request.
If clients connect from outside the container, see listener addresses.