AngularDart: How to run locally release build

Issue

I made release build of AngularDart app with webdev build.

How can I run it locally before deploying to remote hosting server?

At the moment I am using Built-in web server in PHP:

cd build
php -S localhost:8888

Is it possible to run locally release build with webdev or build_runner commands?

Thank you in advance!

Solution

Sure!

webdev serve --release 

or, if you want to run it with a specific build config, replace the build with serve in your build_runner command:

pub run build_runner serve -c production --release -o web:build

And if you want to get to it from somewhere other then localhost:

webdev serve --release --hostname 0.0.0.0

Answered By – Brian Gorman

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *