How can I deploy an Angular 2 application on tomcat server (Windows Server 2012)

后端 未结 5 1727
情话喂你
情话喂你 2020-12-28 08:57

I\'m new in AngularJS 2 framework and I\'m stuck!

I want to deploy an application (quickstart for example) on a Windows Server 2012. I have already installed Apache

5条回答
  •  渐次进展
    2020-12-28 09:38

    If your are using angular-cli command to create angular 2 project.Then cli has given some commands to deploy your application into production. Use command like ng build --prod on your project directory and it will generate dist folder in your directory.

    Go to inside dist folder and change the base href like href="." in index.html. After that copy dist folder in your tomcat root directory and run the server.. you can see below screen shot our application running on tomcat server.

提交回复
热议问题