Introduction to the construction, building and deployment of angular NG project

Source: Internet
Author: User
Preface:

With the project in-depth practice, NG project development, construction, deployment is also more and more clear, please follow the small to see it. Text: Frame Build

ng New MyProject

CNPM Install

ng Serve construction

Development environment Building: NG Build

Production environment construction: NG build--env=prod Server Deployment

1.tomcat deployment: After the construction of the package, placed under WebApps, start Tomcat, Access address: ip+ Port + package name + Host page name

2.nginx deployment: The built package is placed on a nginx server with no specified location, typically placed under usr/local and then configured nginx.conf files,

To configure critical nodes:

<1> Start gzip compression

gzip on;
Gzip_vary on;
Gzip_min_length 1000;
Gzip_comp_level 6;
Gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml Application/xml+rss Text/javascript image/png image/jpeg Appl

<2> Configure access paths

Location/dev {
root/usr/local;
Index index.html;
}

Browser access address: Server ip+ port + configuration Access path name Epilogue:

Simple steps to build, build, deploy easy to handle.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.