angularã®ãµã³ãã«ã½ã¼ã¹ãä½ã£ãæã«ã¹ããã©ã§ç¢ºèªã§ãããµã¼ãã¼ããªãäºã«æ°ãã¤ãã
httpsã使ããFirebaseã®hostingã使ãäºã«ãã¾ãã
ï¼1Gã¾ã§ã¯ç¡æã5Gã§20åãããï¼
ä¸è¨ã®URLã§node.jsãã¤ã³ã¹ãã¼ã«
masalib.hatenablog.com
éçºç°å¢ã®æ¨©éç³»ã§ã¯ã¾ããããªãã®ã§rootã«ãªã
su -
ãããã¤ç³»ã®ãã¼ã«ãã¤ã³ã¹ãã¼ã«ãã
npm install -g firebase-tools
node.jsã®ãã¼ã¸ã§ã³ãå¤ããªããã°ãããªãå ¥ã
vagrant(VirtualBox)ã®ç°å¢ãªã®ã§ãã©ã¦ã¶èµ·åãã§ããªã
èµ·åããªããªãã·ã§ã³ãè¨å®ãã¦ãã°ã¤ã³ã®ã³ãã³ããå®è¡ãã
$ firebase login --no-localhost
ããã¨ã¿ã¼ããã«ã«URLã表示ãã
ã°ã¼ã°ã«ã¸ãã°ã¤ã³ãã¿ã¼ããã«ã§ãã¼ã¯ã³ãèãããã®ã§ããã¸è¡ã£ã¦ã³ãããã¾ãã
ä½æ¥ç¨ã®ãã©ã«ããä½æãã¦åæåãã
$ mkdir /var/src/firebase-test $ cd /var/src/firebase-test $ firebase init
ã©ã®ããã¸ã§ã¯ãã使ç¨ããã¨ãè²ã
ãããã
åèãµã¤ã
qiita.com
firebase.jsonãpublicãã©ã«ããªã©ãã§ããã¯ãã»ã»ã»ã ã£ãã
èªåã®ç°å¢ã¯ãªãã空ãã¡ã¤ã«ã®firebase.jsonãã§ãã¦ä½ãã§ããªãã£ã
æå³ããããããå ¬å¼ãµã¤ãããã³ãããã
{ "hosting": { "public": "app", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ] } }
ã¢ããç¨ãã©ã«ãã¨ãã¡ã¤ã«ãä½ã
$ mkdir /var/src/firebase-test/app $ echo "test masalib" >> /var/src/firebase-test/app/index.html
ãããã¤ãã
$ firebase deploy # === Deploying to 'masalib-hosting'... # i deploying hosting # i hosting: preparing app directory for upload... # i starting release process (may take several minutes)... # â Deploy complete! # Project Console: https://console.firebase.google.com/project/masalib-hosting/overview # Hosting URL: https://masalib-hosting.firebaseapp.com
æåããã¨è¡¨ç¤ºããã
Hosting URLã«ã¢ã¯ã»ã¹ããã¨è¡¨ç¤ºããã
firebaseãéãã§ããã®ã§
ç¾å¨ã¢ããããã¦ããå
容ã¯éãã¾ã
ç¾å¨ãéãã§ããäº
ã»ãªã¢ã«ã¿ã¤ã ãã¼ã¿ãã¼ã¹ã®èªã¿æ¸ã
qiita.com
qiita.com
ã»ãªã¢ã«ã¿ã¤ã 翻訳
github.com
確èªä¸ã®äº
ã»AdSenseåºåã®é
ç½®
ãã§ããã£ã½ããã©ãªãã§ã§ããã®ãããããããªã
ããµããã¡ã¤ã³ã§ã§ããï¼ãªãã§ï¼
ã»WEBãã¹ã¿ã¼ãã¼ã«ã®èªè
ããã¶ãã§ããã£ã½ã
ãä½ããã¼ã¸ãä½ã£ã¦ããªãã®ã§indexåãã§ããã®ãããããªã
ã»ã¯ã³ã¯ãªãã¯ã®ãã¼ã«ããã¯ãã§ããã®ã§ãã
ãããããã¦ã»ã»ã»ãã®åã®å®¹éããã£ã¦ãã
ãèªåçã«æ¶ããªãã®ã確èªä¸
ãï¼æåãªãæ¶ããï¼
ã»ãã¤ãã¿ãfacebookèªè¨¼ãã§ããã¿ãããªã®ã§
ããããã§ããã°ãã£ã¦ã¿ãã
ãããã§ãããangularã®ã½ã¼ã¹ã¯githubã«ããã¦
å®éã«ãããã®ããã®ç°å¢ã§ãããªããã
æçµçã«ã¯ããã³ãã¨ã³ãã¨ãµã¼ãã¼ãµã¤ãã®é¨åã
ãããä»çµã¿ããã£ã¦ã¿ãã