[Ionic] Start server to test Production build in 5mins – Blog của Tứn

[Ionic] Start server to test Production build in 5mins

Sometimes you need to test the build with production mode. But you don’t want to deploy to somewhere.

So just run it on the local folder. With this help

1. Install the server

// http-server is a simple, zero-configuration command-line static HTTP server
npm install --global http-server

2. Build your code as Production mode

ionic build --prod

3. Run & enjoy

http-server C:\path\to\your\folder\www

F G+ T

tuandph

Khởi đầu với .NET từ năm 2013 đến nay. Hiện tại mình đang làm full-stack developer. Yêu thích lập trình & chia sẽ kiến thức. Thời gian rảnh thường làm những tool vui vui và viết lách kể lệ sự đời.