We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8b008d commit fede0fbCopy full SHA for fede0fb
guides/deploy-to-local.md
@@ -0,0 +1,20 @@
1
+# Deploy to local
2
+
3
+# 部署到本地环境
4
5
+有些企业内部的防火墙比较严格,如果无法打开 <https://material.angular.cn>,你可以在企业内部进行私有化部署。步骤如下:
6
7
+本文档的预编译版本位于 [Github](https://github.com/ng-docs/material-cn-prebuilt) 上,如果你想进行私有化部署,请把它 Clone 下来,在 nginx 等服务器上按照静态网站的形式做部署即可,除此之外不需要任何服务端环境。
8
9
+以 Nginx 为例,你需要在 nginx 上做如下改动:
10
11
+```
12
+server {
13
+ root /path/to/material-cn-prebuilt/;
14
+ location / {
15
+ try_files $uri $uri.html $uri/ /index.html;
16
+ }
17
+}
18
19
20
+注意其中的 `$uri.html`,这是本文档相对于常规 Angular 应用的主要差别,因为本文档进行了预先渲染(Prerender),这项工作可以让你在不需要 Node 服务器的情况下获得等同于服务端渲染的体验改善。
0 commit comments