AutoPortServe is a Laravel package that helps you start your Laravel development server and npm development server on available ports dynamically. This package will automatically scan and find a free port, starting from 8000, for the Laravel server and run the npm development server in parallel. It's a handy tool for full-stack developers who work with multiple Laravel applications and require running npm tasks simultaneously.
You can install the package via composer:
composer require amohamed/autoportserve
Register the service provider in your config/app.php
file:
'providers' => [
// ...
Amohamed\AutoPortServe\AutoPortServeServiceProvider::class,
];
Once you have installed the package, you can use the serve:dynamic
artisan command to start your Laravel server on an available port:
php artisan serve:dynamic
The command will print out a message with the URL where your application is being served, such as:
Laravel development server started: <http://127.0.0.1:8000>
You can run the tests with:
vendor/bin/phpunit
Contributions are welcome! Please feel free to submit a pull request.
This package is open-sourced software licensed under the MIT license.
Note: Be sure to replace any placeholder information with the actual details about your package. For example, you might have a different command to run tests, or you might want to include more detailed information about how to contribute to your package.