How to create a localhost server to run an AngularJS project

前端 未结 13 789
迷失自我
迷失自我 2020-11-29 15:56

i have used Xampp and JetBrain WebStorm to run an AngularJS project. But it\'s complicated and low performance.Is there any other way to run an AngularJS project?

13条回答
  •  爱一瞬间的悲伤
    2020-11-29 16:18

    An angular application can be deployed using any Web server on localhost. The options below outline the deployment instructions for several possible webserver deployments depending on your deployment requirements.


    Microsofts Internet Information Services (IIS)

    1. Windows IIS must be enabled

      1.1. In Windows, access the Control Panel and click Add or Remove Programs.

      1.2. In the Add or Remove Programs window, click Add/Remove Windows Components.

      1.3. Select the Internet Information Services (IIS) check box, click Next, then click Finish.

      1.4. Copy and extract the Angular Application Zip file to the webserver root directory: C:\inetpub\wwwroot

    2. The Angular application can now be accessed using the following URL: http://localhost:8080

    NPMs Lightweight Web Server

    1. Installing a lightweight web server 1.1. Download and install npm from: https://www.npmjs.com/get-npm 1.2. Once, npm has been installed open a command prompt and type: npm install -g http-server 1.3. Extract the Angular Zip file
    2. To run the web server, open a command prompt, and navigate to the directory where you extracted the Angular previously and type: http-server
    3. The Angular Application application can now be accessed using the following URL: http://localhost:8080

    Apache Tomcat Web Server

    1. Installing Apache Tomcat version 8 1.1. Download and install Apache Tomcat from: https://tomcat.apache.org/ 1.2. Copy and extract the Angular Application Zip file to the webserver root directory C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps
    2. The Angular Application can now be accessed using the following URL: http://localhost:8080

提交回复
热议问题