Serving and testing a bundle after ng build

前端 未结 3 1367
鱼传尺愫
鱼传尺愫 2021-02-13 03:43

After I build a bundle with ng build --prod --aot I would like to quickly serve it locally. Is there a way to quickly serve the /dist directory locally

3条回答
  •  半阙折子戏
    2021-02-13 03:50

    to test easily built angular app I use this angular-http-server

    to install it you can do

    npm install -g angular-http-server
    cd /path/to/site/dist/site
    angular-http-server
    

    if you need more info you can check the package npm page angular-http-server

提交回复
热议问题