{"id":39256,"date":"2023-05-13T04:49:33","date_gmt":"2023-04-29T20:47:24","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/"},"modified":"2024-04-30T03:53:12","modified_gmt":"2024-04-29T19:53:12","slug":"%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/","title":{"rendered":"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp"},"content":{"rendered":"<h1>\u76ee\u6807<\/h1>\n<p>\u4ee5\u4e0b\u662f\u521b\u5efa\u524d\u7aef\u5e94\u7528\u7a0b\u5e8f\u7684Angular2\uff0c\u5c06\u6e90\u4ee3\u7801\u4fdd\u5b58\u5728GitHub\u4e0a\uff0c\u5e76\u89e3\u91ca\u4e00\u7cfb\u5217\u64cd\u4f5c\u6b65\u9aa4\u4ee5\u5229\u7528Azure\u7684PaaS\u670d\u52a1App Service\u6765\u6258\u7ba1\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u4f7f\u7528\u7684\u670d\u52a1\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">GitHub\/git<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Angular2<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">NPM<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Azure App Service<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Visual Studio Team Services (VSTS) &#8211; \u5225\u540dVisual Studio Online<\/ul>\n<h1>\u51c6\u5907Angular2\u5e94\u7528\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\u3002<\/h1>\n<h2>\u5728GitHub\u4e0a\u521b\u5efa\u4e00\u4e2a\u5206\u652f\u3002<\/h2>\n<p>\u5728\u8fd9\u4e2a\u9636\u6bb5\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u5b58\u50a8Angular 2\u5e94\u7528\u7a0b\u5e8f\u6e90\u4ee3\u7801\u7684\u4ed3\u5e93\u548c\u5206\u652f\u3002\u4f46\u662f\uff0c\u5982\u679c\u5df2\u7ecf\u5b58\u5728\u4e00\u4e2a\u4ed3\u5e93\u548c\u5206\u652f\uff0c\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528\u73b0\u6709\u7684\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u8df3\u8fc7\u8fd9\u4e00\u6b65\u3002<\/p>\n<p>\u6211\u4f7f\u7528\u4e86\u4e00\u4e2a\u540d\u4e3ademo\u7684\u73b0\u6709Git\u4ed3\u5e93\u3002\u6211\u5728\u5176\u4e2d\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3aangular2-demo\u7684\u65b0\u5206\u652f\u3002\u867d\u7136\u5206\u652f\u540d\u79f0\u53ef\u4ee5\u662fmaster\uff0c\u4f46\u4e3a\u4e86\u907f\u514d\u6df7\u6dc6\uff0c\u6211\u51b3\u5b9a\u5c06\u5176\u547d\u540d\u4e3aangular2-demo\u3002<\/p>\n<p>\u5728\u672c\u5730\u7684demo\u4ed3\u5e93\u4e2d\u79fb\u52a8\u5230\u4ee5\u4e0b\u547d\u4ee4\u540e\uff0c\u6267\u884c\u3002<\/p>\n<p>\u5207\u6362\u5230\u5e76\u521b\u5efa\u540d\u4e3aangular2-demo\u7684\u65b0\u5206\u652f<\/p>\n<p>\u5728\u672c\u5730\u7684demo\u5b58\u50a8\u5e93\u4e2d\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u7684angular2-demo\u5206\u652f\u3002<br \/>\n\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2aangular\u7684HelloWorld\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<h2>\u4f7f\u7528 Angular CLI \u5236\u4f5c\u4e00\u4e2a\u7b80\u5355\u7684 HelloWorld \u5e94\u7528\u7a0b\u5e8f\u3002<\/h2>\n<p>\u5047\u8bbeAngular CLI\u5df2\u7ecf\u5b89\u88c5\u597d\u4e86\uff0c\u6211\u4eec\u7ee7\u7eed\u8fdb\u884c\u4e0b\u53bb\u3002<\/p>\n<p>\u9996\u5148\u8981\u521b\u5efa\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>ng new helloworld &#8211;\u4f7f\u7528\u5185\u8054\u6837\u5f0f &#8211;\u4f7f\u7528\u5185\u8054\u6a21\u677f &#8211;\u8df3\u8fc7\u6d4b\u8bd5<\/p>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u4e2d\u7684 &#8220;&#8211;inline-style &#8211;inline-template &#8211;skiptest&#8221; \u662f\u9009\u9879\uff0c\u7528\u4e8e\u963b\u6b62\u7ec4\u4ef6\u7684\u6837\u5f0f\u548cHTML\u6a21\u677f\u5206\u522b\u751f\u6210\u3002\u53ea\u7528 &#8220;ng new helloworld&#8221; \u4e5f\u53ef\u4ee5\uff0c\u4f46\u4e3a\u4e86\u5c3d\u53ef\u80fd\u660e\u4e86\uff0c\u6211\u4eec\u51b3\u5b9a\u9650\u5236\u751f\u6210\u7684\u6587\u4ef6\u6570\u91cf\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u547d\u4ee4\u6267\u884c\u7684\u7ed3\u679c\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/17-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u73b0\u5728\uff0cAngular\u5e94\u7528\u7684\u51c6\u5907\u5de5\u4f5c\u5df2\u7ecf\u5b8c\u6210\u3002\u63a5\u4e0b\u6765\uff0c\u5c06HelloWorld\u5e94\u7528\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\u6682\u65f6\u4fdd\u5b58\u5728GitHub\u4ed3\u5e93\u4e2d\u3002<\/p>\n<h2>\u6682\u65f6\u5c06\u5176\u63a8\u9001\u81f3GitHub\u4ed3\u5e93\u3002<\/h2>\n<p>\u5728\u8fd9\u4e2a\u9636\u6bb5\uff0c\u5148\u5c06\u6587\u4ef6\u6dfb\u52a0\u5230Git\u4ed3\u5e93\u5e76\u8fdb\u884c\u63d0\u4ea4\uff0c\u7136\u540e\u518d\u8fdb\u884c\u63a8\u9001\uff08\u5173\u4e8egit add\u548cgit commit\u547d\u4ee4\u7684\u8be6\u7ec6\u8bf4\u660e\u8bf7\u7701\u7565\uff09\u3002<br \/>\n\u7531\u4e8eangular2-demo\u5206\u652f\u4ec5\u5b58\u5728\u4e8e\u672c\u5730\uff0c\u6240\u4ee5\u4e0b\u9762\u7684\u63a8\u9001\u547d\u4ee4\u5c06\u5728GitHub\u4ed3\u5e93\u4e2d\u521b\u5efaangular2-demo\u5206\u652f\uff0c\u5e76\u4e0a\u4f20\u4e0a\u4e00\u6b65\u521b\u5efa\u7684HelloWorld\u5e94\u7528\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\u3002<\/p>\n<p>\u63a8\u9001\u4ee3\u7801\u5230\u8fdc\u7a0b\u4ed3\u5e93\u7684angular2-demo\u5206\u652f\uff0c\u5e76\u8bbe\u7f6e\u4e3a\u4e0a\u6e38\u5206\u652f\u3002<\/p>\n<p>\u73b0\u5728\u5df2\u7ecf\u5b8c\u6210\u4e86\u6e90\u4ee3\u7801\u7684\u57fa\u7840\u3002\u4ece\u8fd9\u91cc\u5f00\u59cb\uff0c\u6211\u4eec\u5c06\u9010\u6b65\u8fdb\u884c\u4e00\u4e9b\u53d8\u66f4\u3002<\/p>\n<h2>\u5c06web.config\u6dfb\u52a0\u5230\u9879\u76ee\u4e2d<\/h2>\n<p>\u5728Azure\u7684Web App\u4e2d\uff0c\u5fc5\u987b\u6dfb\u52a0\u4e00\u4e2a\u7279\u5b9a\u4e8e.NET\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u79f0\u4e3aweb.config\u3002\u8bf7\u53c2\u8003\u4e0b\u65b9\u7684\u5c4f\u5e55\u622a\u56fe\uff0c\u5c06web.config\u6587\u4ef6\u6dfb\u52a0\u5230HelloWorld\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/25-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8fd9\u91cc\u662fweb.config\u7684\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nt\">&lt;configuration&gt;<\/span>\r\n    <span class=\"nt\">&lt;system.webServer&gt;<\/span>\r\n        <span class=\"nt\">&lt;rewrite&gt;<\/span>\r\n        <span class=\"nt\">&lt;rules&gt;<\/span>\r\n            <span class=\"nt\">&lt;rule<\/span> <span class=\"na\">name=<\/span><span class=\"s\">\"redirect all requests\"<\/span> <span class=\"na\">stopProcessing=<\/span><span class=\"s\">\"true\"<\/span><span class=\"nt\">&gt;<\/span>\r\n                <span class=\"nt\">&lt;match<\/span> <span class=\"na\">url=<\/span><span class=\"s\">\"^(.*)$\"<\/span> <span class=\"na\">ignoreCase=<\/span><span class=\"s\">\"false\"<\/span> <span class=\"nt\">\/&gt;<\/span>\r\n                <span class=\"nt\">&lt;conditions<\/span> <span class=\"na\">logicalGrouping=<\/span><span class=\"s\">\"MatchAll\"<\/span><span class=\"nt\">&gt;<\/span>\r\n                    <span class=\"nt\">&lt;add<\/span> <span class=\"na\">input=<\/span><span class=\"s\">\"{REQUEST_FILENAME}\"<\/span> <span class=\"na\">matchType=<\/span><span class=\"s\">\"IsFile\"<\/span> <span class=\"na\">negate=<\/span><span class=\"s\">\"true\"<\/span> <span class=\"na\">pattern=<\/span><span class=\"s\">\"\"<\/span> <span class=\"na\">ignoreCase=<\/span><span class=\"s\">\"false\"<\/span> <span class=\"nt\">\/&gt;<\/span>\r\n                <span class=\"nt\">&lt;\/conditions&gt;<\/span>\r\n                <span class=\"nt\">&lt;action<\/span> <span class=\"na\">type=<\/span><span class=\"s\">\"Rewrite\"<\/span> <span class=\"na\">url=<\/span><span class=\"s\">\"index.html\"<\/span> <span class=\"na\">appendQueryString=<\/span><span class=\"s\">\"true\"<\/span> <span class=\"nt\">\/&gt;<\/span>\r\n            <span class=\"nt\">&lt;\/rule&gt;<\/span>\r\n        <span class=\"nt\">&lt;\/rules&gt;<\/span>\r\n    <span class=\"nt\">&lt;\/rewrite&gt;<\/span>\r\n    <span class=\"nt\">&lt;\/system.webServer&gt;<\/span>\r\n<span class=\"nt\">&lt;\/configuration&gt;<\/span>\r\n<\/code><\/pre>\n<p>\u6b64web.config\u6587\u4ef6\u5df2\u914d\u7f6e\u4e3a\u5c06\u6240\u6709\u9488\u5bf9Azure Web App\u7684HTTP\u8bf7\u6c42\u91cd\u5b9a\u5411\u5230index.html\u6587\u4ef6\u3002\u8be5index.html\u6587\u4ef6\u662fAngular\u5e94\u7528\u7684\u4e3b\u4f53\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u9700\u8981\u8fdb\u884c\u8bbe\u7f6e\u4ee5\u786e\u4fdd\u5728\u6784\u5efa\u65f6\u6b63\u786e\u5730\u590d\u5236\u6b64web.config\u6587\u4ef6\u3002<\/p>\n<h2>\u4fee\u6539angular-cli.json\u6587\u4ef6\uff0c\u4ee5\u4fbf\u590d\u5236web.config\u6587\u4ef6\u3002<\/h2>\n<p>angular-cli.json\u662f\u6307\u5b9a\u4f7f\u7528Angular CLI\uff08ng\u547d\u4ee4\uff09\u65f6\u7684\u5404\u79cd\u8bbe\u7f6e\u7684\u6587\u4ef6\u3002<br \/>\n\u901a\u8fc7\u5728\u6b64\u6dfb\u52a0web.config\u4f5c\u4e3a\u9759\u6001\u8d44\u6e90\uff0c\u53ef\u4ee5\u5c06\u5176\u914d\u7f6e\u4e3a\u6784\u5efa\u65f6\u7684\u5206\u53d1\u7684\u4e00\u90e8\u5206\u3002<\/p>\n<p>\u8bf7\u6839\u636e\u4e0b\u65b9\u7684\u5c4f\u5e55\u622a\u56fe\u8fdb\u884c\u66f4\u6539\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/33-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u73b0\u5728\uff0c\u6784\u5efa\u540e\uff0cweb.config\u6587\u4ef6\u5c06\u88ab\u590d\u5236\u5230\u5e94\u7528\u7a0b\u5e8f\u7684\u6839\u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<p>\u7136\u540e\uff0c\u6211\u4eec\u5c06\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u751f\u4ea7\u73af\u5883\u6784\u5efa\u811a\u672c\uff08\u547d\u4ee4\uff09\u3002<\/p>\n<h2>\u5c06\u7528\u4e8e\u751f\u4ea7\u73af\u5883\u7684\u6784\u5efa\u811a\u672c\u6dfb\u52a0\u5230package.json\u4e2d\u3002<\/h2>\n<p>\u8fd9\u4e00\u6b65\u9aa4\u5e76\u975e\u5fc5\u9700\uff0c\u5b8c\u5168\u53ef\u4ee5\u4f7f\u7528\u5df2\u5b9a\u4e49\u7684\u540d\u4e3abuild\u7684\u811a\u672c\uff0c\u6ca1\u6709\u4efb\u4f55\u95ee\u9898\u3002\u7136\u800c\uff0c\u4e3a\u4e86\u5728\u7a0d\u540e\u8bbe\u7f6eVSTS\u6784\u5efa\u5b9a\u4e49\u65f6\u66f4\u52a0\u6e05\u6670\u660e\u4e86\uff0c\u6211\u4eec\u5c06\u53e6\u5916\u8bbe\u7f6e\u4e00\u4e2a\u65b0\u7684\u547d\u4ee4\uff0c\u4e0e\u5df2\u7ecf\u8bbe\u7f6e\u7684\u547d\u4ee4\u4e0d\u540c\u3002<\/p>\n<p>\u6839\u636e\u4ee5\u4e0b\u5c4f\u5e55\u622a\u56fe\u4e3a\u53c2\u8003\uff0c\u6211\u4eec\u5c06\u6dfb\u52a0\u4e00\u4e2a\u540d\u4e3abuild-prod\u7684\u65b0\u7684npm\u547d\u4ee4\u811a\u672c\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/39-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6211\u5011\u901a\u904e\u6dfb\u52a0-prod\u9078\u9805\u4f86\u751f\u6210\u7528\u65bc\u751f\u7522\u74b0\u5883\u7684\u4ee3\u78bc\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6267\u884c\u65b0\u589e\u7684build-prodscript\u5e76\u786e\u8ba4\u751f\u6210\u7684\u4ee3\u7801\u3002<\/p>\n<h2>\u5728\u672c\u5730\u6267\u884c\u751f\u4ea7\u73af\u5883\u7684\u6784\u5efa\u811a\u672c\uff0c\u4ee5\u786e\u8ba4\u8f93\u51fa\u3002<\/h2>\n<p>\u8bf7\u6309\u7167\u4e0a\u8ff0\u6b65\u9aa4\u624b\u52a8\u6267\u884c\u9884\u5148\u8bbe\u5b9a\u7684`build-prod`\u547d\u4ee4\u3002<\/p>\n<p>\u8fd0\u884c\u201cnpm run build-prod\u201d\u7684\u6784\u5efa\u547d\u4ee4\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/45-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u4e0a\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u4e2d\uff0c\u53ef\u4ee5\u770b\u5230\u4e00\u4e2a\u540d\u4e3adist\u7684\u6587\u4ef6\u5939\u5df2\u88ab\u521b\u5efa\u3002\u8fd9\u662f\u5b58\u50a8\u751f\u4ea7\u73af\u5883\u6587\u4ef6\u7684\u6587\u4ef6\u5939\u3002\u8bf7\u8bb0\u4f4f\uff0c\u5728\u540e\u7eed\u914d\u7f6eVSTS\u7684\u6784\u5efa\u5b9a\u4e49\u65f6\uff0c\u8fd9\u5c06\u518d\u6b21\u63d0\u5230\uff0c\u8bf7\u7262\u8bb0\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6682\u65f6\u5c06\u6b63\u5f0f\u73af\u5883\u653e\u4e00\u8fb9\uff0c\u5148\u786e\u8ba4\u672c\u5730\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<h2>\u5728\u672c\u5730\u5f00\u53d1\u548c\u8fd0\u884cHelloWorld\u5e94\u7528\u7a0b\u5e8f\u3002<\/h2>\n<p>\u4f7f\u7528Angular CLI\u521b\u5efaAngular\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u975e\u5e38\u7b80\u5355\u3002\u53ea\u9700\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u3002<\/p>\n<p>npm \u542f\u52a8<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/51-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4f7f\u7528Angular CLI\u8fdb\u884c\u6784\u5efa\u540e\uff0c\u5c06\u8f93\u51fa\u4fdd\u5b58\u5728\u5185\u5b58\u4e2d\uff0c\u5e76\u8fd0\u884c\u8f7b\u91cf\u7ea7\u7684Web\u670d\u52a1\u5668\u6765\u6258\u7ba1HelloWorld\u5e94\u7528\u7a0b\u5e8f\u3002Angular CLI\u7684\u547d\u4ee4`ng serve`\u6267\u884c\u8fd9\u4e2a\u4e00\u7cfb\u5217\u7684\u64cd\u4f5c\uff0c\u5bf9\u5e94\u4e8e`start`\u811a\u672c\uff08\u8bf7\u5728`package.json`\u4e2d\u641c\u7d22`&#8221;start&#8221;`\uff09\u3002<\/p>\n<p>\u5f53\u5728\u6d4f\u89c8\u5668\u4e2d\u8bf7\u6c42localhost:4200\u65f6\uff0c\u5c06\u52a0\u8f7dHelloWorld\u5e94\u7528\u7a0b\u5e8f\u7684\u9875\u9762\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/54-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u90a3\u4e48\uff0c\u6211\u4eec\u6765\u4eff\u7167\u5f00\u53d1\u5faa\u73af\uff0c\u52a0\u5165\u4e00\u4e9b\u7b80\u5355\u7684\u66f4\u6539\u6765\u770b\u770b\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/56-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u7531\u4e8eng serve\u7684\u4f5c\u7528\uff0c\u5b83\u53ef\u4ee5\u81ea\u52a8\u68c0\u6d4b\u5230\u6587\u4ef6\u7684\u66f4\u6539\u5e76\u81ea\u52a8\u8fdb\u884c\u6784\u5efa\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/58-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u53ef\u4ee5\u786e\u8ba4\u53d8\u66f4\u5df2\u7ecf\u751f\u6548\u3002<\/p>\n<p>\u8fd9\u6837\uff0cAngular2\u7684HelloWorld\u5e94\u7528\u7a0b\u5e8f\u5c31\u5b8c\u6210\u4e86\u3002\u6211\u5c06\u66f4\u6539\u63a8\u9001\u5230GitHub\u4ed3\u5e93\u3002<\/p>\n<p>\u63a8\u9001 Git<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u6258\u7ba1HelloWorld\u5e94\u7528\u7684Azure App Service\u3002<\/p>\n<h1>\u51c6\u5907Angular2\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u673a<\/h1>\n<h2>\u521b\u5efaAzure App Service<\/h2>\n<p>\u53ef\u4ee5\u91cd\u65b0\u5229\u7528\u73b0\u6709\u7684Azure App Service\uff0c\u56e0\u6b64\u6b64\u6b65\u9aa4\u662f\u53ef\u9009\u7684\u3002\u6211\u4f7f\u7528\u4e2a\u4ebaHotmail\u5730\u5740\u521b\u5efa\u4e86\u4e00\u4e2a\u514d\u8d39\u7684Azure\u8ba2\u9605\uff0c\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3atw-angular01\u7684App Service\u3002<\/p>\n<p>\u6682\u4e0d\u8be6\u8ff0\u6b64\u4efb\u52a1\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u4e0b\u65b9\u7684\u622a\u56fe\u662f\u5728\u672c\u6587\u4e2d\u4f7f\u7528\u7684App Service\u3002\u5173\u4e8eApp Service Plan\uff0c\u7531\u4e8eAngular\u5e94\u7528\u662f\u9759\u6001\u5e94\u7528\u7a0b\u5e8f\uff0c\u6240\u4ee5\u514d\u8d39\u7248\uff08\u4e0e\u5176\u4ed6\u7528\u6237\u5171\u4eab\u7684\u8f83\u5f31\u865a\u62df\u673a\uff09\u5df2\u8db3\u591f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/67-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u73b0\u5728\u53ef\u4ee5\u51c6\u5907\u597d\u4f5c\u4e3a\u90e8\u7f72\u76ee\u6807\u7684Azure App Service\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8fdb\u5165\u4e00\u7cfb\u5217\u5173\u4e8e\u8bbe\u7f6eVisual Studio Team Services\uff08VSTS\uff09\u6784\u5efa\u5b9a\u4e49\u7684\u5de5\u4f5c\u3002\u9996\u5148\uff0c\u6211\u4eec\u8981\u5f00\u59cb\u8bbe\u7f6eVSTS\u4e0eGitHub\u7684\u534f\u4f5c\u3002<\/p>\n<h1>\u51c6\u5907\u7528\u4e8e\u6258\u7ba1\u90e8\u7f72Angular2\u5e94\u7528\u7684\u6784\u5efa\u5b9a\u4e49\u3002<\/h1>\n<h2>\u8bbe\u7f6e Service Endpoint \u4ee5\u8fde\u63a5 GitHub \u7684 VSTS\u3002<\/h2>\n<p>\u5728\u8fd9\u4e00\u7cfb\u5217\u6b65\u9aa4\u4e2d\u6709\u4e24\u4e2a\u524d\u63d0\u6761\u4ef6\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6211\u5df2\u7ecf\u62e5\u6709VSTS\uff08\u4ee5\u524d\u88ab\u79f0\u4e3aVisual Studio Online\uff09\u7684\u8d26\u6237\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u6211\u5df2\u7ecf\u5728VSTS\u5185\u521b\u5efa\u4e86\u60f3\u8981\u4f7f\u7528\u7684\u9879\u76ee\u3002<\/ol>\n<p>VSTS\u4ee5\u524d\u53c8\u79f0\u4e3aVisual Studio Online\u3002\u5982\u679c\u60a8\u8fd8\u6ca1\u6709\u8d26\u6237\uff0c\u53ef\u4ee5\u4f7f\u7528Microsoft\u5e10\u6237\uff08\u4f8b\u5982\uff1ahotmail\u3001outlook.com\uff09\u7b49\u90ae\u7bb1\u5730\u5740\u6765\u65b0\u5efa\u4e00\u4e2a\u8d26\u6237\u3002<br \/>\n\u5173\u4e8e\u9879\u76ee\uff0c\u53ef\u4ee5\u662f\u73b0\u6709\u7684\u9879\u76ee\uff0c\u4e5f\u53ef\u4ee5\u662f\u9ed8\u8ba4\u63d0\u4f9b\u7684\u9879\u76ee\uff0c\u4f46\u6211\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3asamples\u7684\u9879\u76ee\u3002<\/p>\n<p>VSTS\u7684\u7f51\u5740\uff1ahttps:\/\/www.visualstudio.com\/vso\/<\/p>\n<p>\u4e00\u65e6\u51c6\u5907\u597dVSTS\u9879\u76ee\u540e\uff0c\u6309\u7167\u4ee5\u4e0b\u622a\u56fe\u7684\u53c2\u8003\uff0c\u6211\u4eec\u5c06\u8fdb\u5165GitHub\u670d\u52a1\u8fde\u63a5\u7684\u65b0\u5efa\u754c\u9762\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/77-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8bf7\u5728\u65b0\u7684\u670d\u52a1\u7ec8\u7aef\u70b9\u4e0b\u62c9\u83dc\u5355\u4e2d\u9009\u62e9GitHub\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/79-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5c31\u4f1a\u663e\u793a\u4e0b\u9762\u8fd9\u6837\u7684\u5bf9\u8bdd\u6846\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/81-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6309\u4e0b\u300c\u6388\u6743\u300d\u6309\u94ae\uff0c\u6839\u636e\u6307\u793a\u5728\u5355\u4e00\u767b\u5f55\u4e2d\u6388\u4e88\u6743\u9650\u3002<br \/>\n\u8fde\u63a5\u540d\u79f0\u53ef\u4ee5\u4efb\u610f\uff0c\u4f46\u6211\u9009\u62e9\u4e86\u201cgithubyoshiwatanabe\u201d\uff0c\u56e0\u4e3a\u6211\u5c06\u5728\u4ee5\u540e\u518d\u6b21\u4f7f\u7528\u5b83\uff0c\u6240\u4ee5\u9009\u62e9\u4e86\u4e00\u4e2a\u6613\u4e8e\u7406\u89e3\u7684\u540d\u79f0\u3002<\/p>\n<p>\u4f7f\u7528\u8fd9\u4e2a\u521b\u5efa\u4e86VSTS\u548cGitHub\u4e4b\u95f4\u534f\u4f5c\u6240\u9700\u7684\u670d\u52a1\u8fde\u63a5\uff08\u670d\u52a1\u7aef\u70b9\uff09\u3002<\/p>\n<p>\u7136\u540e\u521b\u5efaVSTS\u7684\u6784\u5efa\u5b9a\u4e49\u3002<\/p>\n<h2>\u521b\u5efa\u65b0\u7684VSTS\u6784\u5efa\u5b9a\u4e49<\/h2>\n<p>\u6211\u4e0d\u4f1a\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u521b\u5efaVSTS\u7684\u65b0\u5efa\u6784\u5efa\u5b9a\u4e49\u3002\u5f53\u60a8\u9009\u62e9\u9876\u90e8\u7684Build \uff06 Release\u83dc\u5355\u65f6\uff0c\u60a8\u4f1a\u77e5\u9053\u5982\u4f55\u64cd\u4f5c\u3002\u6211\u7ed9\u5b83\u8d77\u4e86\u4e00\u4e2a\u540d\u5b57\u53ebsamples-angular-cli-CI\u3002<\/p>\n<p>\u56e0\u4e3a\u6211\u4eec\u5c06\u5728\u4e0b\u9762\u8be6\u7ec6\u89e3\u91ca\uff0c\u6240\u4ee5\u73b0\u5728\u5373\u4f7f\u662f\u7a7a\u7684\u72b6\u6001\u4e5f\u53ef\u4ee5\u6dfb\u52a0\u5230\u6784\u5efa\u5b9a\u4e49\u4e2d\u7684\u6b65\u9aa4\u4e2d\u3002<\/p>\n<p>\u53ea\u8981\u5728\u6784\u5efa\u5b9a\u4e49\u5217\u8868\u4e2d\u663e\u793a\u4e0e\u4e0b\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u7c7b\u4f3c\u7684\u72b6\u6001\uff0c\u5c31\u8868\u793a\u5df2\u5b8c\u6210\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/89-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u63a5\u4e0b\u6765\uff0c\u60a8\u9700\u8981\u6839\u636e\u4e0b\u9762\u7684\u5c4f\u5e55\u622a\u56fe\uff0c\u6309\u7167\u987a\u5e8f\u8bbe\u7f6e\u4e00\u4e2a\u5305\u542b\u4e09\u4e2a\u6784\u5efa\u6b65\u9aa4\u7684\u6784\u5efa\u5b9a\u4e49\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/91-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u9996\u5148\uff0c\u5728\u6784\u5efa\u5b9a\u4e49\u4e2d\u6307\u5b9a\u4ece\u54ea\u91cc\u4e0b\u8f7d\u6e90\u4ee3\u7801\u3002<\/p>\n<h2>\u6784\u5efa\u5b9a\u4e49\u4e2d\u7684&#8221;Get Source&#8221;\u6b65\u9aa4\u4f7f\u7528GitHub\u3002<\/h2>\n<p>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u5148\u524d\u8bbe\u7f6e\u7684VSTS\u548cGitHub\u8fdb\u884c\u534f\u4f5c\u7684\u670d\u52a1\u8fde\u63a5\u3002<\/p>\n<p>\u5728\u9009\u62e9\u6e90\u4ee3\u7801\u65f6\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9GitHub\uff0c\u5e76\u6307\u5b9a\u5b58\u50a8\u5e93\u548c\u5206\u652f\u3002\u8fd9\u91cc\u6307\u5b9a\u4e86\u4e00\u4e2a\u540d\u4e3aangular2-demo\u7684\u5206\u652f\uff0c\u4f46\u60a8\u4e5f\u53ef\u4ee5\u9009\u62e9\u5176\u4ed6\u5206\u652f\uff0c\u5982master\u7b49\uff08\u5f53\u7136\uff0c\u524d\u63d0\u662f\u5728\u8be5\u5206\u652f\u4e0a\u6709angular2\u5e94\u7528\u7a0b\u5e8f\uff09\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/96-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4e0b\u9762\u662f\u4ece\u76f8\u5173\u7684GitHub\u4ed3\u5e93\u548c\u5206\u652f\u7684\u89d2\u5ea6\u6765\u770b\u7684\u3002\u4e3a\u4e86\u4ee5\u9632\u4e07\u4e00\uff0c\u6211\u4f1a\u5148\u786e\u8ba4\u4e00\u4e0b\u5185\u5bb9\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/98-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4ece\u8fd9\u91cc\u5f00\u59cb\uff0c\u6211\u4eec\u5c06\u9010\u6b65\u8bbe\u7f6e\u4e09\u4e2a\u6784\u5efa\u6b65\u9aa4\u3002\u9996\u5148\u662f\u4e0b\u8f7dnpm\u5305\u7684\u6b65\u9aa4\u3002<\/p>\n<h2>\u8bbe\u7f6e\u7b2c\u4e00\u4e2anpm\u5b89\u88c5\u6b65\u9aa4<\/h2>\n<p>\u53c2\u8003\u4ee5\u4e0b\u5c4f\u5e55\u622a\u56fe\uff0c\u8bbe\u7f6e\u6267\u884cnpm install\u547d\u4ee4\u7684\u6b65\u9aa4\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5728Working folder with package.json\uff08\u5305\u542bpackage.json\u7684\u5de5\u4f5c\u6587\u4ef6\u5939\uff09\u5b57\u6bb5\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8def\u5f84\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/102-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u6dfb\u52a0\u6784\u5efaHelloWorld\u7684\u6b65\u9aa4\u3002<\/p>\n<h2>\u8bbe\u7f6e\u7b2c\u4e8c\u4e2anpm\u81ea\u5b9a\u4e49\u6b65\u9aa4<\/h2>\n<p>Angular\u5e94\u7528\u53ef\u4ee5\u901a\u8fc7\u6267\u884cnpm\u7684\u811a\u672c\u6765\u6784\u5efa\u3002\u901a\u8fc7\u9009\u62e9\u81ea\u5b9a\u4e49\u547d\u4ee4\uff0c\u53ef\u4ee5\u6267\u884c\u4efb\u610f\u7684\u811a\u672c\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u901a\u8fc7\u8fd0\u884c\u4e4b\u524d\u914d\u7f6e\u7684build-prod\u811a\u672c\u6765\u751f\u6210\u751f\u4ea7\u73af\u5883\u7684\u8f93\u51fa\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/106-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4ee5\u4e0b\u662fpackage.json\u4e2d\u7684build-prod\u811a\u672c\uff0c\u786e\u4fdd\u5b83\u7b49\u540c\u4e8eAngular CLI\u547d\u4ee4ng build -prod\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/108-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8fd9\u6837\u5c31\u8bbe\u7f6e\u4e86\u4e00\u4e2a\u64cd\u4f5c\u6b65\u9aa4\uff0c\u5373\u4eceGitHub\u4e0b\u8f7d\u6e90\u4ee3\u7801\uff0c\u7136\u540e\u5b89\u88c5npm\u5305\uff0c\u6700\u540e\u6784\u5efaHelloWorld\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u6700\u540e\u53ea\u9700\u5c06\u6784\u5efa\u597d\u7684HelloWorld\u5e94\u7528\u90e8\u7f72\u5230Azure\u7684App Service\u4e0a\u3002<\/p>\n<h2>\u6700\u540e\u4e00\u6b65\u662f\u8bbe\u7f6e\u5c06\u5e94\u7528\u90e8\u7f72\u5230Azure App Service\u3002<\/h2>\n<p>\u9009\u62e9\u6b63\u786e\u7684Azure\u8ba2\u9605\u5e76\u6307\u5b9a\u6240\u9700\u7684\u5e94\u7528\u670d\u52a1\u3002\u5728\u201cPackage or Folder\u201d\u5b57\u6bb5\u4e2d\uff0c\u7279\u522b\u6ce8\u610f\u6307\u5b9ahelloworld\/dist\u6587\u4ef6\u5939\u3002\u786e\u4fdd\u8be5\u6587\u4ef6\u5939\u5305\u542b\u540d\u4e3a\u201cdist\u201d\u7684\u5b50\u6587\u4ef6\u5939\u3002\u6b64\u6587\u4ef6\u5939\u4f1a\u5728\u6267\u884cng build\u65f6\u81ea\u52a8\u751f\u6210\u3002\u5982\u679c\u5728\u672c\u5730\u6267\u884cng serve\uff0c\u5219\u4e0d\u4f1a\u751f\u6210\u6b64\u6587\u4ef6\u5939\uff08\u800c\u662f\u5c06\u6784\u5efa\u6587\u4ef6\u4fdd\u5b58\u5728\u5185\u5b58\u4e2d\uff09\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/113-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8fd9\u6837\u5c31\u5b8c\u6210\u4e86\u6784\u5efa\u5b9a\u4e49\u7684\u521b\u5efa\u3002\u63a5\u4e0b\u6765\u53ea\u9700\u8981\u5c06\u6784\u5efa\u5b9a\u4e49\u6392\u5165\u961f\u5217\uff0c\u8ba9\u6784\u5efa\u4ee3\u7406\u6267\u884c\u5373\u53ef\u3002<\/p>\n<h2>\u5c06\u6784\u5efa\u5b9a\u4e49\u6392\u5165\u961f\u5217\u4e2d<\/h2>\n<p>\u5728\u5efa\u7b51\u5b9a\u4e49\u754c\u9762\u4e0a\u9009\u62e9\u961f\u5217\u6309\u94ae\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/117-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u9009\u62e9\u6258\u7ba1\u4e3b\u673a\u4f5c\u4e3a\u4ee3\u7406\u3002\u540c\u65f6\uff0c\u6307\u5b9a\u4e4b\u524d\u7528\u8fc7\u7684angular2-demo\u5206\u652f\u4f5c\u4e3a\u914d\u7f6e\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/119-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4ee5\u4e0b\u662f\u5c4f\u5e55\u622a\u56fe\uff0c\u663e\u793a\u4e86\u5efa\u7b51\u7269\u5df2\u7ecf\u6392\u961f\u7b49\u5f85\u7684\u72b6\u6001\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/121-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4ee5\u4e0b\u662f\u5efa\u7b51\u6210\u529f\u7684\u6837\u5b50\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/123-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u7531\u4e8e\u5df2\u6210\u529f\u5b8c\u6210\u6700\u540e\u4e00\u6b65\uff08\u90e8\u7f72\u5230Azure Web App\uff09\uff0c\u56e0\u6b64\u5728\u8fd9\u4e2a\u9636\u6bb5\uff0cHelloWorld\u5e94\u7528\u5e94\u8be5\u5df2\u7ecf\u88ab\u90e8\u7f72\u5230Azure Web App\uff0c\u5e76\u4e14\u53ef\u4ee5\u663e\u793a\u51fa\u6765\u3002<\/p>\n<h2>\u5c55\u793aAzure Web Service\u7684URL<\/h2>\n<p>\u5982\u679c\u4f60\u60f3\u8981\u5c55\u793aHelloWorld\u5e94\u7528\uff0c\u4f60\u53ef\u4ee5\u4eceAzure App Service\u7684\u9875\u9762\u4e0a\u83b7\u53d6URL\u3002\u5982\u679c\u4f60\u4e0d\u77e5\u9053URL\u662f\u4ec0\u4e48\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/127-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u52a0\u8f7dURL\u9875\u9762\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/129-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u987a\u5229\u663e\u793a\u4e86\u3002\u901a\u8fc7GitHub\u4ed3\u5e93\u8fdb\u884c\u6784\u5efa\u548c\u90e8\u7f72\u6210\u529f\u4e86\u3002<\/p>\n<p>\u5c3d\u7ba1\u8fd9\u6837\u8bbe\u7f6e\u5df2\u7ecf\u5b8c\u6210\uff0c\u4f46\u5982\u679c\u5728GitHub\u5206\u652f\u4e0a\u8fdb\u884c\u66f4\u6539\uff08\u901a\u8fc7\u63a8\u9001\u6216\u62c9\u53d6\u8bf7\u6c42\uff09\uff0c\u8ba9\u6211\u4eec\u81ea\u52a8\u8fdb\u884c\u6784\u5efa\u2192\u90e8\u7f72\u7684\u6301\u7eed\u96c6\u6210\u8bbe\u7f6e\u5427\u3002<\/p>\n<h2>\u5c06\u8fde\u7eed\u96c6\u6210\u9009\u9879\u8bbe\u4e3a\u5f00\u542f\u3002<\/h2>\n<p>\u56de\u5230\u6784\u5efa\u5b9a\u4e49\uff0c\u4ece\u89e6\u53d1\u5668\u8bbe\u7f6e\u4e2d\u5c06\u8fde\u7eed\u96c6\u6210\u542f\u7528\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/134-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728HelloWorld\u5e94\u7528\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\u4e2d\uff0c\u6211\u7a0d\u4f5c\u66f4\u6539\u3002\u4ee5\u4e0b\u662f\u5728\u9875\u9762\u6d88\u606f\u4e2d\u6dfb\u52a0\u4e86&#8221;with CI&#8221;\u8fd9\u4e2a\u5b57\u7b26\u4e32\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/136-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6700\u540e\uff0c\u5728Git\u4e2d\uff0c\u6267\u884cadd\u3001commit\u548cpush\u64cd\u4f5c\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/138-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u67e5\u770b\u6784\u5efa\u5b9a\u4e49\u7684\u8fd9\u4e2a\u9636\u6bb5\uff0c\u53ef\u4ee5\u81ea\u52a8\u786e\u8ba4\u6709\u65b0\u7684\u6784\u5efa\u5df2\u7ecf\u6392\u961f\u7b49\u5019\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/140-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6211\u4f1a\u7b49\u5f85\u7f16\u8bd1\u5b8c\u6210\u540e\u7684\u5408\u9002\u65f6\u95f4\u91cd\u65b0\u52a0\u8f7d\u9875\u9762\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/142-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u53ef\u4ee5\u770b\u5230\u5df2\u7ecf\u53cd\u6620\u4e86\u63a8\u9001\u7684\u5185\u5bb9\u3002\u901a\u8fc7\u8fd9\u4e2a\u673a\u5236\uff0c\u6211\u4eec\u5c06HelloWorld\u5e94\u7528\u7a0b\u5e8f\u7684\u66f4\u6539\u81ea\u52a8\u5316\u4e3a\u4ec5\u9488\u5bf9GitHub\u5206\u652f\u7684\u66f4\u6539\u3002<\/p>\n<p>\u5b9e\u9645\u9875\u9762\uff1ahttp:\/\/tw-angular01.azurewebsites.net\/<\/p>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u5c3d\u7ba1\u6709\u70b9\u957f\uff0c\u4f46\u662f\u60a8\u53ef\u4ee5\u4f7f\u7528Azure\u6765\u6258\u7ba1Angular2\u7684\u524d\u7aef\u5e94\u7528\u7a0b\u5e8f\uff0c\u5c31\u50cf\u8fd9\u6837\u3002\u53ef\u80fd\u8fd8\u6709\u5176\u4ed6\u66f4\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u4f46\u662f\u5982\u679c\u60a8\u8fdb\u884c\u4e86\u8bbe\u7f6e\uff0c\u5305\u62ec\u6301\u7eed\u96c6\u6210\uff0c\u90a3\u4e48\u90e8\u7f72\u8fc7\u7a0b\u5c06\u5b8c\u5168\u81ea\u52a8\u5316\uff0c\u56e0\u6b64\u6211\u8ba4\u4e3a\u8fd9\u662f\u503c\u5f97\u8bbe\u7f6e\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6807 \u4ee5\u4e0b\u662f\u521b\u5efa\u524d\u7aef\u5e94\u7528\u7a0b\u5e8f\u7684Angular2\uff0c\u5c06\u6e90\u4ee3\u7801\u4fdd\u5b58\u5728GitHub\u4e0a\uff0c\u5e76\u89e3\u91ca\u4e00\u7cfb\u5217\u64cd\u4f5c\u6b65\u9aa4\u4ee5\u5229\u7528Azu [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-39256","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528vsts\u5c06angular2\u5e94\u7528\u7a0b\u5e8f\u4ecegithub\u90e8\u7f72\u5230azure\u7684webapp\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u6807 \u4ee5\u4e0b\u662f\u521b\u5efa\u524d\u7aef\u5e94\u7528\u7a0b\u5e8f\u7684Angular2\uff0c\u5c06\u6e90\u4ee3\u7801\u4fdd\u5b58\u5728GitHub\u4e0a\uff0c\u5e76\u89e3\u91ca\u4e00\u7cfb\u5217\u64cd\u4f5c\u6b65\u9aa4\u4ee5\u5229\u7528Azu [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528vsts\u5c06angular2\u5e94\u7528\u7a0b\u5e8f\u4ecegithub\u90e8\u7f72\u5230azure\u7684webapp\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-29T20:47:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T19:53:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/17-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/\",\"name\":\"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-04-29T20:47:24+00:00\",\"dateModified\":\"2024-04-29T19:53:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528vsts\u5c06angular2\u5e94\u7528\u7a0b\u5e8f\u4ecegithub\u90e8\u7f72\u5230azure\u7684webapp\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp","og_description":"\u76ee\u6807 \u4ee5\u4e0b\u662f\u521b\u5efa\u524d\u7aef\u5e94\u7528\u7a0b\u5e8f\u7684Angular2\uff0c\u5c06\u6e90\u4ee3\u7801\u4fdd\u5b58\u5728GitHub\u4e0a\uff0c\u5e76\u89e3\u91ca\u4e00\u7cfb\u5217\u64cd\u4f5c\u6b65\u9aa4\u4ee5\u5229\u7528Azu [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528vsts\u5c06angular2\u5e94\u7528\u7a0b\u5e8f\u4ecegithub\u90e8\u7f72\u5230azure\u7684webapp\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-04-29T20:47:24+00:00","article_modified_time":"2024-04-29T19:53:12+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d398e37434c4406c7a0cd\/17-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/","name":"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-04-29T20:47:24+00:00","dateModified":"2024-04-29T19:53:12+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528VSTS\u5c06Angular2\u5e94\u7528\u7a0b\u5e8f\u4eceGitHub\u90e8\u7f72\u5230Azure\u7684WebApp"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8vsts%e5%b0%86angular2%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e4%bb%8egithub%e9%83%a8%e7%bd%b2%e5%88%b0azure%e7%9a%84webapp%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=39256"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39256\/revisions"}],"predecessor-version":[{"id":89520,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39256\/revisions\/89520"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=39256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=39256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=39256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}