How to Kill a laravel application after Serving

 

To stop a Laravel/ Lumen service running on port a specific port e.g. 8003, you can follow these steps:

Open a terminal window and navigate to the root directory of the Lumen application.

Run the following command to stop the PHP development server:

php artisan serve:stop

This will stop the PHP development server, and the application will no longer be accessible on port 8003.

Alternatively, you can also stop the service by pressing CTRL + C in the terminal window where the development server is running. This will terminate the process and stop the server.

If the Lumen service is running as a daemon or in the background, you may need to use additional steps to stop it. For example, you can use the ps command to find the process ID of the Lumen service, and then use the kill command to terminate the process.


ps aux | grep "php artisan serve"

This will list all processes that contain the string "php artisan serve". Find the process ID of the Lumen service, and then run the following command to kill the process:

kill process-id

Replace process-id with the actual process ID of the Lumen service. This will stop the Lumen service and terminate the process.

No comments:

Post a Comment