{"id":658,"date":"2020-07-09T10:18:51","date_gmt":"2020-07-09T02:18:51","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=658"},"modified":"2020-11-25T17:51:09","modified_gmt":"2020-11-25T09:51:09","slug":"firebase-hosting","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/firebase-hosting\/","title":{"rendered":"Firebase Hosting"},"content":{"rendered":"<h3>1.\u5148\u5b89\u88ddNode.js<\/h3>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/nodejs.org\/en\/\" title=\"Node.js\" target=\"_blank\" rel=\"noopener\">Node.js<\/a><\/p>\n<h3>2.\u5b89\u88ddFirebase\u5de5\u5177<\/h3>\n<pre><code class=\"language-CLI line-numbers\">npm install -g firebase-tools\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/functions.jpg\" alt=\"\" \/><\/p>\n<h3>3.\u767b\u5165Fireabase\u5e33\u865f<\/h3>\n<pre><code class=\"language-CLI line-numbers\">firebase login\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/functions-login.jpg\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/functions-login-success.jpg\" alt=\"\" \/><\/p>\n<h3>4.\u521d\u59cb\u5316Firebase SDK for Cloud Functions<\/h3>\n<pre><code class=\"language-CLI line-numbers\">firebase init\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/functions-init.jpg\" alt=\"\" \/><\/p>\n<h4>\u9078\u64c7\u521d\u59cb\u5316\u8981\u4f7f\u7528\u7684\u529f\u80fd(\u9078\u53d6\u6642\u4f7f\u7528\u7a7a\u767d\u9375)<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting3.jpg\" alt=\"\" \/><\/p>\n<h4>\u5982\u4f55\u53d6\u7684\u5c08\u6848<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/functions-choice-project.jpg\" alt=\"\" \/><\/p>\n<h4>\u9078\u53d6\u9700\u8981\u5c0e\u5165\u7684\u5c08\u6848<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/functions-choice-project-2.jpg\" alt=\"\" \/><\/p>\n<h4>\u8a2d\u5b9a\u8cc7\u6599\u593e\u540d\u7a31<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting2.jpg\" alt=\"\" \/><\/p>\n<h4>\u662f\u5426\u5148\u914d\u7f6e\u4e00\u500b\u9801\u9762index.html<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting1.jpg\" alt=\"\" \/><\/p>\n<h4>\u5efa\u7acb\u6210\u529f<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting.jpg\" alt=\"\" \/><\/p>\n<h3>5.\u5229\u7528IDE\u958b\u555f\u6a94\u6848<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting4.jpg\" alt=\"\" \/><\/p>\n<h3>6.\u958b\u555findex.html<\/h3>\n<pre><code class=\"language-HTML line-numbers\">&lt;!DOCTYPE HTML&gt;\n&lt;html&gt;\n&lt;head&gt;\n    &lt;title&gt;Hello&lt;\/title&gt;\n    &lt;meta charset=\"utf-8\"\/&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n     Hello Firebase Hosting\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<h3>7.\u4e0a\u50b3\u6a94\u6848\u81f3firebase<\/h3>\n<pre><code class=\"language-CLI line-numbers\">firebase deploy\n<\/code><\/pre>\n<h4>\u6210\u529f\u9801\u9762<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting5.jpg\" alt=\"\" \/><\/p>\n<h4>Firebase Hosting\u9801\u9762<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting6.jpg\" alt=\"\" \/><\/p>\n<h3>8.\u9ede\u64caFirebase\u7d66\u6211\u5011\u7684DNS<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting8.jpg\" alt=\"\" \/><\/p>\n<h3>9.\u9801\u9762\u8cc7\u8a0a<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting9.jpg\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/07\/firebase-hosting7.jpg\" alt=\"\" \/><\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>1.\u5148\u5b89\u88ddNode.js Node.js 2.\u5b89\u88ddFirebase\u5de5\u5177 npm install -g fire &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[34],"tags":[40,101,102],"class_list":["post-658","post","type-post","status-publish","format-standard","hentry","category-firebase","tag-firebase","tag-hosting","tag-html"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/comments?post=658"}],"version-history":[{"count":3,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/658\/revisions"}],"predecessor-version":[{"id":970,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/658\/revisions\/970"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}