Nearsighted Penguin March

    laravel-mix-artisan-serve

    2.0.0 • Public • Published

    Laravel Mix Artisan Serve

    Latest Version on NPM Software License Total Downloads

    This extension allows you to automatically serve your Laravel app with php artisan serve with Laravel Mix.
    Please make sure that you are using laravel-mix version 4.0 or higher.

    This package only runs when the --watch flag is passed such as with the default npm run watch command from a default Laravel install.

    Usage

    You can install the package with npm or yarn:

    npm install laravel-mix-artisan-serve --save-dev
    yarn add laravel-mix-artisan-serve --dev

    Then require the extension in your Mix configuration:

    const mix = require('laravel-mix');
    
    require('laravel-mix-artisan-serve');
    ...

    Enable the extension by calling .serve() at the end of your Mix chain:

    mix.sass('resources/sass/app.scss', 'public/css').serve();

    This will serve your Laravel application at http://localhost:8000 by default.

    If you need to customize the host or port, you may pass an object to .serve():

    mix.sass('resources/sass/app.scss', 'public/css').serve({
      host: '127.0.0.1',
      port: '3000',
    });

    And you're done!

    Contributing

    Please see CONTRIBUTING for details.

    Credits

    License

    The MIT License (MIT). Please see License File for more information.

    Install

    npm i laravel-mix-artisan-serve

    DownloadsWeekly Downloads

    50

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    6.1 kB

    Total Files

    6

    Last publish

    Collaborators

    • geoff_selby