How to run the Dist Folder on Local Machine in Angular 6+?

前端 未结 6 1434
无人共我
无人共我 2020-12-07 16:47

I am building the application in Angular6+, now I have run the command ng build --prod which gave me a dist folder. Now how to check or serve that

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-07 17:17

    windows platform

     - Install wamp server --> 
       https://wampserver.en.softonic.com/ and start.
     - your dist folder files copy to c:/wamp/www/(your project name)/
     - And create .htaccess file redirect your index.html.
       (http://www.htaccesstools.com/htaccess-faq/)
     - Next run browser http://localhost/(your project name)
    

    ubuntu platform

     - Install lamp server --> 
       https://www.linode.com/docs/web-servers/lamp/install-lamp-stack-on-ubuntu-16-04/ and start.
     - your dist folder files copy to /opt/lampp/htdocs/(your project name)/
     - And create .htaccess file redirect your index.html.
       (http://www.htaccesstools.com/htaccess-faq/)
     - Next run browser http://localhost/(your project name)
    

提交回复
热议问题