<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2482626752544217754</id><updated>2024-11-01T03:37:14.696-07:00</updated><category term="精選網站"/><category term="ActionScript 3.0"/><category term="遊戲APP推薦"/><category term="泛用型APP推薦"/><category term="CitrusEngine"/><category term="遊戲引擎"/><category term="專案"/><category term="ActionScript 3.0 教學"/><category term="JavaScript"/><category term="Flash AIR"/><category term="FaceBook"/><category term="Node.js"/><category term="撰寫外部as檔 從零開始"/><category term="flash 組件"/><category term="HTML5"/><category term="好文轉載"/><category term="Starling"/><category term="技術備忘"/><category term="朝向前端工程師之路"/><category term="Stage3D"/><category term="IOS"/><category term="Library"/><category term="jQuery"/><category term="APP專案"/><category term="ActionScript專案經驗談"/><category term="pixijs"/><category term="精選網站"/><category term="泛用型APP推薦"/><category term="Demo"/><category term="Flash"/><category term="Threejs"/><category term="bower"/><category term="u"/><category term="回鍋無雙"/><category term="因人廢言"/><category term="專案作品"/><category term="自Hi玩意"/><category term="遊戲APP推薦 中文APP推薦"/><title type='text'>Cain,s MaxDesign</title><subtitle type='html'>我的互動技術筆記本</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>646</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-2228733745518636800</id><published>2017-03-07T04:06:00.004-08:00</published><updated>2017-03-07T04:06:44.928-08:00</updated><title type='text'>手機網頁開發設計注意事項</title><content type='html'>&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
開發手機網頁有很多地方與開發在電腦上用遊覽器看的網頁有很多不同的地方。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
下面列出一些一定要注意的基本事項，藉此提醒同學。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;https://cainmaila.github.io/2017/03/07/mobile-page/&quot;&gt;詳細請見我的新部落格&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/2228733745518636800/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/2228733745518636800' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2228733745518636800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2228733745518636800'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2017/03/blog-post.html' title='手機網頁開發設計注意事項'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-1965236477196253093</id><published>2017-02-01T22:19:00.005-08:00</published><updated>2017-02-01T22:19:46.088-08:00</updated><title type='text'>建立你的前端開發環境(一) - Rollup</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;為了建構一個讓自己可以開心工作的js前端開發環境，嘗試了了Grunt，Gulp,一直到目前最多人的 Webpack&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;Webpack 真的很不錯，外掛資源也豐富，但是總覺得輸出封裝後的code有些多餘(甚至你不會想要看他)，其實有時候只是需要封裝一個小模組，可能一些小演算法，或許用了ES6語法，想輸出處理成乾乾淨淨的js。這時候可以考慮使用&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://rollupjs.org/&quot; rel=&quot;external&quot; style=&quot;background-color: white; border: 0px; color: #258fb8; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Rollup.js&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;, 比起 Webpack 它更小更快，還能刪除多餘的程式碼(沒有用到的模組，rollup不會把它封裝到你的js)，但是最大的重點就是，我實在不想為了寫個小東西就去建構一個肥大的webpack環境....&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h3&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/2017/01/25/rollup-web-app/&quot;&gt;建立你的前端開發環境(一) - Rollup&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/1965236477196253093/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/1965236477196253093' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1965236477196253093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1965236477196253093'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2017/02/rollup.html' title='建立你的前端開發環境(一) - Rollup'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-6372708698871404472</id><published>2016-10-18T19:05:00.001-07:00</published><updated>2016-10-18T19:05:23.068-07:00</updated><title type='text'>Sublime Text 整理 vue Template</title><content type='html'>&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
自從開始用Vue框架後，一直很快樂的在coding前端，不但學習曲線低，效能也上得了檯面&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
最棒的是可以像React自訂Component，不但架構清晰，如果規劃的好，Component還可以拿去別的專案使用。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
vue.js 允許你自己定義 .vue 檔(Component檔)，你可以把Template，js，css(less、sass..) 全部封裝在裡面，最後透過 像是 webpack 或者 rollup 打包進你的專案使用。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
筆者本身使用 Sublime Text 作為開發IDE，你可上去&amp;nbsp;&lt;a href=&quot;https://packagecontrol.io/&quot; rel=&quot;external&quot; style=&quot;border: 0px; color: #258fb8; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;packagecontrol.io&lt;/a&gt;上查看vue的相關資源，目前有以下三個。&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; list-style-image: initial; list-style-position: initial; margin: 1.6em 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Vuejs Snippets&lt;/strong&gt;&amp;nbsp;- 提供vue Snippets&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Vue Syntax Highlight&lt;/strong&gt;&amp;nbsp;- vue語法支援&lt;/li&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Vuejs Complete Package&lt;/strong&gt;&amp;nbsp;- vue語法自動完整&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
有了以上這些掛件，基本上可以讓你在Sublime Text很開心的開發vue.js&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
最後你如果有使用版型整理，會發現並沒有支援.vue檔的掛件 (這件事曾將讓我這偏執狂很很不開心XD)&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
但是只細觀察後你會發現一件事，.vue的內容，其實是可以符合html規範的，所以當你想要整理.vue的Template時，只要把你平常整理html的方法拿來整理.vue就行了。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
詳情請見以下連結&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #555555; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/2016/10/18/sublime-vue-template/&quot;&gt;https://cainmaila.github.io/2016/10/18/sublime-vue-template/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; line-height: 1.6em; margin-bottom: 1.6em; margin-top: 1.6em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;碼農們! 繼續快樂的開發吧!&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/6372708698871404472/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/6372708698871404472' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/6372708698871404472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/6372708698871404472'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/10/sublime-text-vue-template.html' title='Sublime Text 整理 vue Template'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-1389426342304076554</id><published>2016-10-13T19:58:00.004-07:00</published><updated>2016-10-13T19:58:33.846-07:00</updated><title type='text'>新一代的js套件管理工具yarn - 取代npm的工具</title><content type='html'>&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;談一下突然爆紅的&lt;/span&gt;&lt;a href=&quot;https://github.com/yarnpkg/yarn&quot; rel=&quot;external&quot; style=&quot;background-color: white; border: 0px; color: #258fb8; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Yarn&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;，這是Facebook最近發布的一款依賴包安裝工具。&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;比較npm有什麼看得見的優勢? 首先，他&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;非常快&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;，快到見鬼XD&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px;&quot;&gt;祥請見我新部落格..&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #555555; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/2016/10/14/use-yern/&quot;&gt;https://cainmaila.github.io/2016/10/14/use-yern/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/1389426342304076554/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/1389426342304076554' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1389426342304076554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1389426342304076554'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/10/jsyarn-npm.html' title='新一代的js套件管理工具yarn - 取代npm的工具'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-2270580529840591850</id><published>2016-10-07T04:10:00.003-07:00</published><updated>2016-10-07T04:12:39.301-07:00</updated><title type='text'>node-rados安裝與使用 - nodejs與Ceph通訊</title><content type='html'>&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;最近開始使用nodejs與公司的&lt;/span&gt;&lt;a href=&quot;http://www.ithome.com.tw/tech/98860&quot; rel=&quot;external&quot; style=&quot;background-color: white; border: 0px; color: #258fb8; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Ceph&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;串接資料，中間需要透過一個叫做&lt;/span&gt;&lt;a href=&quot;https://www.npmjs.com/package/rados&quot; rel=&quot;external&quot; style=&quot;background-color: white; border: 0px; color: #258fb8; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;node-rados&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;的掛件工具，不過一開始就在安裝時踩了不少坑，這裡做一下備忘，也提醒之後要使用的人。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #555555; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;詳細請見&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #555555; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/2016/10/07/how-to-install-node-rados/&quot;&gt;https://cainmaila.github.io/2016/10/07/how-to-install-node-rados/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/2270580529840591850/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/2270580529840591850' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2270580529840591850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2270580529840591850'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/10/node-rados-nodejsceph.html' title='node-rados安裝與使用 - nodejs與Ceph通訊'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-6697140063854811760</id><published>2016-09-14T03:18:00.006-07:00</published><updated>2016-09-14T03:18:43.378-07:00</updated><title type='text'>基於Thrift的Node.js微服物通訊</title><content type='html'>&lt;h1 class=&quot;article-title&quot; itemprop=&quot;name&quot; style=&quot;background-color: white; border: 0px; color: #555555; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; line-height: 1.1em; margin: 0px; outline: 0px; padding: 0px; transition: color 0.2s; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;https://cainmaila.github.io/2016/09/14/use-thrift-nodejs/&quot;&gt;基於Thrift的Node.js微服物通訊&lt;/a&gt;&lt;/h1&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #666666; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot;&gt;部落格已經搬家囉!&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif; font-size: 15.4px;&quot; /&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #666666; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 1.7em; font-weight: 300; line-height: 1.1; margin: 1.5em 0px; position: relative;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #2a6496; outline: 0px; text-decoration: none;&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/6697140063854811760/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/6697140063854811760' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/6697140063854811760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/6697140063854811760'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/thriftnodejs.html' title='基於Thrift的Node.js微服物通訊'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-626531695244920389</id><published>2016-09-08T00:40:00.000-07:00</published><updated>2016-09-08T00:40:03.005-07:00</updated><title type='text'>讓你更優雅的使用Webpack - webpack-dashboard</title><content type='html'>&lt;a href=&quot;https://cainmaila.github.io/2016/09/07/use-webpack-dashboard/&quot; target=&quot;_blank&quot;&gt;讓你更優雅的使用Webpack - webpack-dashboard&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #666666; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot;&gt;部落格已經搬家囉!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #666666; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 1.7em; font-weight: 300; line-height: 1.1; margin: 1.5em 0px; position: relative;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #2a6496; outline: 0px; text-decoration: none;&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/626531695244920389/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/626531695244920389' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/626531695244920389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/626531695244920389'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/webpack-webpack-dashboard.html' title='讓你更優雅的使用Webpack - webpack-dashboard'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-4149259186852701043</id><published>2016-09-06T21:18:00.004-07:00</published><updated>2016-09-06T21:18:39.811-07:00</updated><title type='text'>如何在Hexo預設模板增加comments的Widget</title><content type='html'>&lt;h2&gt;
&lt;a href=&quot;https://cainmaila.github.io/2016/07/25/hexo-add-disqus-widget/&quot; target=&quot;_blank&quot;&gt;如何在Hexo預設模板增加comments的Widget&lt;/a&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot;&gt;部落格已經搬家囉!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 1.7em; font-weight: 300; line-height: 1.1; margin: 1.5em 0px; position: relative;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #2a6496; outline: 0px; text-decoration: none;&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/4149259186852701043/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/4149259186852701043' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4149259186852701043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4149259186852701043'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/hexocommentswidget.html' title='如何在Hexo預設模板增加comments的Widget'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-3643300736635366014</id><published>2016-09-06T21:17:00.004-07:00</published><updated>2016-09-06T21:17:52.072-07:00</updated><title type='text'>如何利用Commander建立自己的Node命令</title><content type='html'>&lt;h2&gt;
&lt;br /&gt;&lt;a href=&quot;https://cainmaila.github.io/2016/07/22/how-to-use-commander/&quot; target=&quot;_blank&quot;&gt;如何利用Commander建立自己的Node命令&lt;/a&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot;&gt;部落格已經搬家囉!&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot; /&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 1.7em; font-weight: 300; line-height: 1.1; margin: 1.5em 0px; position: relative;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #2a6496; outline: 0px; text-decoration: none;&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/3643300736635366014/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/3643300736635366014' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/3643300736635366014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/3643300736635366014'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/commandernode.html' title='如何利用Commander建立自己的Node命令'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-6821904115376755426</id><published>2016-09-06T21:16:00.004-07:00</published><updated>2016-09-06T21:16:30.962-07:00</updated><title type='text'>利用Github建立自己的部落格</title><content type='html'>&lt;h2&gt;
&lt;a href=&quot;https://cainmaila.github.io/2016/07/22/How-to-build-hexo-to-github/&quot; target=&quot;_blank&quot;&gt;利用Github建立自己的部落格&lt;/a&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot;&gt;部落格已經搬家囉!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 1.7em; font-weight: 300; line-height: 1.1; margin: 1.5em 0px; position: relative;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #2a6496; outline: 0px; text-decoration: none;&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/6821904115376755426/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/6821904115376755426' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/6821904115376755426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/6821904115376755426'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/github.html' title='利用Github建立自己的部落格'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-1144894871132170084</id><published>2016-09-06T21:14:00.004-07:00</published><updated>2016-09-06T21:14:29.632-07:00</updated><title type='text'>nodejs使用redis緩存key值</title><content type='html'>&lt;h2&gt;
&lt;a href=&quot;https://cainmaila.github.io/2016/07/25/how-to-setup-redis/&quot; target=&quot;_blank&quot;&gt;nodejs使用redis緩存key值&lt;/a&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot;&gt;部落格已經搬家囉!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 1.7em; font-weight: 300; line-height: 1.1; margin: 1.5em 0px; position: relative;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #2a6496; outline: 0px; text-decoration: none;&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/1144894871132170084/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/1144894871132170084' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1144894871132170084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1144894871132170084'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/nodejsrediskey.html' title='nodejs使用redis緩存key值'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-2118196843343190795</id><published>2016-09-06T21:07:00.004-07:00</published><updated>2016-09-06T21:07:48.301-07:00</updated><title type='text'>使用Cordova包裝你的Web，建立你的第一個APP</title><content type='html'>&lt;h2&gt;
&lt;a href=&quot;https://cainmaila.github.io/2016/07/28/how-to-use-cordova/&quot; target=&quot;_blank&quot;&gt;使用Cordova包裝你的Web，建立你的第一個APP&lt;/a&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 16.5px; line-height: 23.1px;&quot;&gt;&amp;nbsp;部落格已經搬家囉!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;Source Sans Pro&amp;quot;, sans-serif; font-size: 1.7em; font-weight: 300; line-height: 1.1; margin: 1.5em 0px; position: relative;&quot;&gt;
&lt;b style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot; style=&quot;background: transparent; box-sizing: border-box; color: #2a6496; outline: 0px; text-decoration: none;&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/2118196843343190795/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/2118196843343190795' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2118196843343190795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2118196843343190795'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/cordovawebapp.html' title='使用Cordova包裝你的Web，建立你的第一個APP'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-2249488082198900682</id><published>2016-09-06T21:04:00.001-07:00</published><updated>2016-09-06T21:05:40.580-07:00</updated><title type='text'>利用Jsdoc幫Javascript產出漂亮的文檔</title><content type='html'>&lt;h2&gt;
&lt;a href=&quot;https://cainmaila.github.io/2016/08/05/use-leedian-jsdoc/&quot;&gt;利用Jsdoc幫Javascript產出漂亮的文檔&lt;/a&gt;&amp;nbsp;&lt;/h2&gt;
&lt;br /&gt;
&amp;nbsp;部落格已經搬家囉! &lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;&lt;a href=&quot;https://cainmaila.github.io/&quot;&gt;Cain Play It&lt;/a&gt;&lt;/b&gt;&lt;/h3&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/2249488082198900682/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/2249488082198900682' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2249488082198900682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/2249488082198900682'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/09/jsdocjavascript.html' title='利用Jsdoc幫Javascript產出漂亮的文檔'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-3294657382077345675</id><published>2016-07-13T03:21:00.002-07:00</published><updated>2016-07-13T03:21:58.751-07:00</updated><title type='text'>web服務器-修改文件瀏覽器livereload工具</title><content type='html'>&lt;h1 id=&quot;web服務器-修改文件瀏覽器livereload&quot;&gt;
web服務器+ 修改文件瀏覽器Livereload&lt;/h1&gt;
有時候自己寫一些小網頁，除了架web服務器，還得一直重新整理頁面，乾脆自己作一個小工具來用。&lt;br /&gt;
下載位置 &lt;br /&gt;
&lt;a href=&quot;https://github.com/cainmaila/page-reload/archive/master.zip&quot;&gt;https://github.com/cainmaila/page-reload/archive/master.zip&lt;/a&gt;&lt;br /&gt;
這個服務包提供一個小型的web服務，預設為80 port,當服務啟動後，會監視www資料夾裡的檔案，檔案發生變動，瀏覽器也會自動更新。&lt;br /&gt;
&lt;blockquote&gt;
須配合Chrome瀏覽器使用&lt;/blockquote&gt;
&lt;h2 id=&quot;安裝方式&quot;&gt;
安裝方式&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;安裝&lt;a href=&quot;https://nodejs.org/dist/v4.4.7/node-v4.4.7-x64.msi&quot;&gt;nodejs&lt;/a&gt;，官網下載直接安裝即可&lt;/li&gt;
&lt;li&gt;安裝gulp-cli&lt;/li&gt;
&lt;/ol&gt;
cmd命令列輸入&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs lasso&quot;&gt;npm i gulp&lt;span class=&quot;hljs-attribute&quot;&gt;-cli&lt;/span&gt; &lt;span class=&quot;hljs-attribute&quot;&gt;-g&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;安裝套件&lt;/li&gt;
&lt;/ol&gt;
cmd命令列輸入&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs coffeescript&quot;&gt;&lt;span class=&quot;hljs-built_in&quot;&gt;npm&lt;/span&gt; i&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei&quot;&gt;安裝瀏覽器外掛&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;啟動服務&quot;&gt;
啟動服務&lt;/h2&gt;
cmd命令列輸入&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs sql&quot;&gt;npm &lt;span class=&quot;hljs-operator&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;start&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;使用方式&quot;&gt;
使用方式&lt;/h2&gt;
1.要編輯的靜態頁面請放置在 www 資料夾&lt;br /&gt;
2.開啟 &lt;a href=&quot;http://127.0.0.1/&quot;&gt;瀏覽器&lt;/a&gt;&lt;br /&gt;
3.確認開啟瀏覽器的livereload外掛&lt;br /&gt;
修改文件即可livereload</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/3294657382077345675/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/3294657382077345675' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/3294657382077345675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/3294657382077345675'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/07/web-livereload.html' title='web服務器-修改文件瀏覽器livereload工具'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-4899374669005669136</id><published>2016-03-01T03:40:00.001-08:00</published><updated>2016-03-01T03:42:35.590-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bower"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="朝向前端工程師之路"/><title type='text'>前端工程師之路(五)</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
&lt;title&gt;前端工程師之路(五)&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/res-min/themes/base.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;&lt;div class=&quot;container&quot;&gt;&lt;h1 id=&quot;bower-套件管理工具&quot;&gt;Bower 套件管理工具&lt;/h1&gt;

&lt;p&gt;雖說 Nodejs 神通廣大，可以讓你只要懂js就可以偷跨領域，不過我們本業還是Web前端工程師，學習Node主要還是希望可以協助我們發展更棒的前端流程，有了之前的Node的理解，接下來的章節，將開始介紹一些協助前端開發的常用工具(這些工具都會架構在Node之上)。&lt;/p&gt;

&lt;p&gt;還記得之前提過的&lt;code&gt;npm&lt;/code&gt;管理工具嗎? 可以讓你用很簡單的方法安裝nodejs套件，比方&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs cs&quot;&gt;npm install express  &lt;span class=&quot;hljs-comment&quot;&gt;//安裝web開發套件&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;如果你喜歡這種安裝套件模式的話，bower將會是一個很棒的選擇。&lt;/p&gt;



&lt;h4 id=&quot;bower-是什麼&quot;&gt;Bower 是什麼?&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEZc6hkKwneCFc_OWzcXa2PRBKlSW6zfqd0MtC-JZ305a7J4YstM0PsaY369xq1_SlA4DMH6nkaJak5nFUPOQxrYvhD_cmswculEAAP5tFxC4lBA0IQfy79_zBIhRqy5UuliLpKP3A_dnR/s1600/zlrTjni.png&quot; alt=&quot;enter image description here&quot; title=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;簡單來說，他可以用像是&lt;code&gt;npm&lt;/code&gt;的方法來安裝與管理你的 js 函示庫，比方 jQuery &lt;br&gt;
以往當你的專案需要使用&lt;code&gt;jQuery&lt;/code&gt;這種第三方函示庫時，會有以下幾種方式&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;到 jQuery 官網，取得編譯後的 js 再嵌入自己的html中&lt;/li&gt;
&lt;li&gt;直接連外部的 cdn 服務&lt;/li&gt;
&lt;li&gt;重舊的專案copy過來&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;由於我們自認為是高階的工程師，怎麼可以用這麼普通的方法取得第三方函示庫，一定得用酷一點的方式XD&lt;/p&gt;

&lt;p&gt;如果你使用了&lt;strong&gt;bower&lt;/strong&gt;，如果你要使用 &lt;code&gt;jquery&lt;/code&gt; 你只要再專案資料夾中執行&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs &quot;&gt;bower jquery&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;他就會自動幫你下載“`jquery““到你的專案中。&lt;/p&gt;



&lt;h4 id=&quot;安裝-bower&quot;&gt;安裝 Bower&lt;/h4&gt;

&lt;p&gt;實際實作一下比較能體會，我們可以裡用npm安裝bower套件。&lt;/p&gt;

&lt;p&gt;請打開&lt;code&gt;cmd&lt;/code&gt;命令視窗，由於&lt;code&gt;bower&lt;/code&gt;可以安裝全域模式(就是他是給整台電腦用的命令，不需要裝在特定專案裡，所以cmd開在哪個路徑下就無所謂了)，打開&lt;code&gt;cmd&lt;/code&gt;後，輸入以下&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs cmake&quot;&gt;npm &lt;span class=&quot;hljs-keyword&quot;&gt;install&lt;/span&gt; bower -g&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;按下&lt;code&gt;enter&lt;/code&gt;後應該會開始安裝。&lt;/p&gt;

&lt;p&gt;說明一下以上指令的意義，&lt;code&gt;npm install bower&lt;/code&gt; 很明顯就是安裝&lt;code&gt;bower&lt;/code&gt;這個套件，後面的 &lt;code&gt;-g&lt;/code&gt; 很重要，這叫做全域安裝，代表&lt;code&gt;bower&lt;/code&gt;是安裝於系統層級，往後不管&lt;code&gt;cmd&lt;/code&gt;    路徑在哪裡，都可以使用&lt;code&gt;bower&lt;/code&gt;這個套件。&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;換句話說，如果你忘了加上 -g ，就表示只有這個資料夾可以使用 bower ，你可能會想那我如果 npm   install express -g 後是否以後就不用安裝 express了。&lt;/p&gt;
  
  &lt;p&gt;確實如你所想，不過一般而言我們不會這樣做，因為你不會希望，當需要升級某個專案時，卻影響到其他不須升級的專案，可能因為不相容而導致錯誤。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;安裝完後，你可以試著執行&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs &quot;&gt;bower&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;他會列出 &lt;code&gt;bower&lt;/code&gt; 的使用方法&lt;/p&gt;



&lt;h4 id=&quot;使用-bower&quot;&gt;使用 Bower&lt;/h4&gt;

&lt;p&gt;接下來我們來實際使用一下，首先&lt;code&gt;cmd&lt;/code&gt;到你需要安裝套件的資料夾中。&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;如果你對於下 cmd 路徑感到麻煩，這裡教各位一個比較簡單切換路徑的方式，假設你在桌面上有個資料夾，你需要把 cmd 路徑設於此，你只需要打開這資料夾，並將滑鼠移到資料夾裡，接著按下鍵盤的&lt;code&gt;shift&lt;/code&gt; 按鍵，並按下滑鼠的右鍵，開啟功能介面，介面中會多出一個&lt;strong&gt;在此處開啟命令視窗&lt;/strong&gt;，我們選擇他後，就可以直接在這個路徑下啟動 cmd&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;我們在這裡試著安裝 jQuery &lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs cmake&quot;&gt;npm &lt;span class=&quot;hljs-keyword&quot;&gt;install&lt;/span&gt; jquery&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;會開始安裝，預設情況下，他會幫你放在&lt;code&gt;bower_components&lt;/code&gt;的&lt;code&gt;jquery&lt;/code&gt;裡面&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;之後你安裝 bower 套件的js後，他都會整理在這裡，你需要在html中嵌入這個路徑，bower_components\jquery\dist\jquery.min.js，或者是你想copy到其他地方。 &lt;br&gt;
  如果你不喜歡預設路徑，實際上是可以修改的，不過我打算之後再談，因為我們大家都知道，看到bower_components這個資料夾，就是第三方函示庫。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;預設安裝最新版本，如果想安裝其他版本的&lt;code&gt;jquery&lt;/code&gt;怎麼辦? 我們先看看是否有其他版本，cmd 輸入&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs nginx&quot;&gt;&lt;span class=&quot;hljs-title&quot;&gt;bower&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot;&gt;info&lt;/span&gt; jquery&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;他會列出目前版本編號，假設你需要安裝的是 1.9.1 的 jquery，你可以輸入&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs cmake&quot;&gt;bower &lt;span class=&quot;hljs-keyword&quot;&gt;install&lt;/span&gt; jquery&lt;span class=&quot;hljs-comment&quot;&gt;#1.9.1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;如此便會幫你安裝正確的版本&lt;/p&gt;

&lt;p&gt;bower 有一個很棒的功能，就是它會自動幫你安裝好相依的其他還函示庫，舉個例子，如果你需要安裝&lt;code&gt;Bootstrap&lt;/code&gt; ，你可能使用以下方式安裝&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs cmake&quot;&gt;bower &lt;span class=&quot;hljs-keyword&quot;&gt;install&lt;/span&gt; bootstrap&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;你會發覺，除了安裝好 Bootstrap 以外，他連 jQuery 也會一起安裝，因為 bower 會察覺，使用 Bootstrap 一定得安裝 jQuery (會尋找建議的版號)。&lt;/p&gt;

&lt;p&gt;這樣子你就不會因為少裝了套件而導致不能使用。&lt;/p&gt;

&lt;p&gt;附上官網資源，想深入理解可以詳讀 &lt;br&gt;
&lt;a href=&quot;http://bower.io/&quot;&gt;http://bower.io/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/body&gt;
&lt;/html&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/4899374669005669136/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/4899374669005669136' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4899374669005669136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4899374669005669136'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/03/blog-post_1.html' title='前端工程師之路(五)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEZc6hkKwneCFc_OWzcXa2PRBKlSW6zfqd0MtC-JZ305a7J4YstM0PsaY369xq1_SlA4DMH6nkaJak5nFUPOQxrYvhD_cmswculEAAP5tFxC4lBA0IQfy79_zBIhRqy5UuliLpKP3A_dnR/s72-c/zlrTjni.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-7830068610610534581</id><published>2016-03-01T03:39:00.000-08:00</published><updated>2017-03-07T04:07:05.568-08:00</updated><title type='text'></title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEZc6hkKwneCFc_OWzcXa2PRBKlSW6zfqd0MtC-JZ305a7J4YstM0PsaY369xq1_SlA4DMH6nkaJak5nFUPOQxrYvhD_cmswculEAAP5tFxC4lBA0IQfy79_zBIhRqy5UuliLpKP3A_dnR/s1600/zlrTjni.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEZc6hkKwneCFc_OWzcXa2PRBKlSW6zfqd0MtC-JZ305a7J4YstM0PsaY369xq1_SlA4DMH6nkaJak5nFUPOQxrYvhD_cmswculEAAP5tFxC4lBA0IQfy79_zBIhRqy5UuliLpKP3A_dnR/s320/zlrTjni.png&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/7830068610610534581/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/7830068610610534581' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/7830068610610534581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/7830068610610534581'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/03/blog-post.html' title=''/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEZc6hkKwneCFc_OWzcXa2PRBKlSW6zfqd0MtC-JZ305a7J4YstM0PsaY369xq1_SlA4DMH6nkaJak5nFUPOQxrYvhD_cmswculEAAP5tFxC4lBA0IQfy79_zBIhRqy5UuliLpKP3A_dnR/s72-c/zlrTjni.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-1120990608863896247</id><published>2016-02-16T07:39:00.001-08:00</published><updated>2016-02-16T07:41:21.243-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="朝向前端工程師之路"/><title type='text'>朝向Node.js工程師之路 (四)</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
&lt;title&gt;朝向Node.js工程師之路 (四)&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/res-min/themes/base.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;&lt;div class=&quot;container&quot;&gt;&lt;h2 id=&quot;關於express與npm&quot;&gt;關於Express與npm&lt;/h2&gt;

&lt;p&gt;剛過完年，文章再開，這篇就先廢話一下。 &lt;br&gt;
如果前幾章有跟著實作的話，相信有感受到nodejs的魅力了！&lt;/p&gt;

&lt;h4 id=&quot;關於express&quot;&gt;關於express&lt;/h4&gt;

&lt;p&gt;之前跟大家介紹的&lt;strong&gt;express&lt;/strong&gt;，其實就是一個專門處理網路服務的框架，拿來處理靜態文件只是很基本的功能，實務上你可以用它來取代你的&lt;code&gt;php&lt;/code&gt;，資料庫當然一樣可以串連&lt;code&gt;mysql&lt;/code&gt;或者更方便的nosql形式，比方&lt;strong&gt;mongoDb&lt;/strong&gt;。&lt;/p&gt;

&lt;p&gt;你可以建立你自己的Api服務器，甚至更大的雲端分散式系統。如果你對網路服務很有興趣，不妨可以先專研express框架，坊間也有專門介紹express用法的書籍。目前前端人才市場如果你會做網頁，也會自己寫express服務，作全端開發(前後端一氣呵成)，這樣的人才是相當搶手的!&lt;/p&gt;

&lt;p&gt;提供一些學習資源&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://expressjs.jser.us/&quot;&gt;express官網&lt;/a&gt;&lt;/p&gt;



&lt;h4 id=&quot;關於npm&quot;&gt;關於npm&lt;/h4&gt;

&lt;p&gt;nodejs 之所以這麼好用，很大一部分該歸功於npm，他讓使用者不必一直重複造輪子， npm上好用的東西可不是只有express，裡面有上萬個模組，玲瑯滿目各式功能讓你可以很快速的跨越領域，有興趣可以上 &lt;a href=&quot;https://www.npmjs.com/&quot;&gt;npm 官方網站&lt;/a&gt; 逛逛，以下列出幾個好用的工具與組件給大家參考。&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;express&lt;/strong&gt; 這不用說了，必學!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;grunt&lt;/strong&gt; 開發流程自動化，前端工程師必學，可以省下很多時間&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;bower&lt;/strong&gt; 第三方外掛管理，你可以把它想成網頁開發的npm工具&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;browserify&lt;/strong&gt; 讓npm中的模組可以在網頁開發上使用&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;pm2&lt;/strong&gt; 幫你管理執行中的nodejs程式&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mocha&lt;/strong&gt; 幫忙測試你的js&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;codova&lt;/strong&gt; 用js開發app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;以上只提到小小的一部分，想深入理解請自己去google了&lt;/p&gt;

&lt;p&gt;難怪人家都說前端是個很大的坑，根本學不完XD&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXWhsETFCKhBt8BTllsGr3ZtdI681oR0i4EJqB852hVyEE5UIXjp2fa-4LV9pzYeoPwpehC3uchmC9OhY93l8e_unfe6IFMx6wp9xFADtNBYQZ_s6WexFttrnZnP8wCo7ZB4LsUCOLUIN/s1600/2356375c5e16252275.jpg&quot; alt=&quot;enter image description here&quot; title=&quot;&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/body&gt;
&lt;/html&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/1120990608863896247/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/1120990608863896247' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1120990608863896247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1120990608863896247'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/02/nodejs.html' title='朝向Node.js工程師之路 (四)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXWhsETFCKhBt8BTllsGr3ZtdI681oR0i4EJqB852hVyEE5UIXjp2fa-4LV9pzYeoPwpehC3uchmC9OhY93l8e_unfe6IFMx6wp9xFADtNBYQZ_s6WexFttrnZnP8wCo7ZB4LsUCOLUIN/s72-c/2356375c5e16252275.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-7748154661946100835</id><published>2016-02-16T07:38:00.000-08:00</published><updated>2017-03-07T04:07:05.565-08:00</updated><title type='text'></title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXWhsETFCKhBt8BTllsGr3ZtdI681oR0i4EJqB852hVyEE5UIXjp2fa-4LV9pzYeoPwpehC3uchmC9OhY93l8e_unfe6IFMx6wp9xFADtNBYQZ_s6WexFttrnZnP8wCo7ZB4LsUCOLUIN/s1600/2356375c5e16252275.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXWhsETFCKhBt8BTllsGr3ZtdI681oR0i4EJqB852hVyEE5UIXjp2fa-4LV9pzYeoPwpehC3uchmC9OhY93l8e_unfe6IFMx6wp9xFADtNBYQZ_s6WexFttrnZnP8wCo7ZB4LsUCOLUIN/s320/2356375c5e16252275.jpg&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/7748154661946100835/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/7748154661946100835' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/7748154661946100835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/7748154661946100835'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/02/blog-post.html' title=''/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIXWhsETFCKhBt8BTllsGr3ZtdI681oR0i4EJqB852hVyEE5UIXjp2fa-4LV9pzYeoPwpehC3uchmC9OhY93l8e_unfe6IFMx6wp9xFADtNBYQZ_s6WexFttrnZnP8wCo7ZB4LsUCOLUIN/s72-c/2356375c5e16252275.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-8646971819832644073</id><published>2016-02-04T06:39:00.001-08:00</published><updated>2016-02-04T06:42:29.504-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="朝向前端工程師之路"/><title type='text'>朝向Node.js工程師之路 (三)</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
&lt;title&gt;朝向Node.js工程師之路 (三)&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/res-min/themes/base.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;&lt;div class=&quot;container&quot;&gt;&lt;h2 id=&quot;朝向前端工程師之路-我的第一個nodejs服務器&quot;&gt;朝向前端工程師之路 - 我的第一個Nodejs服務器&lt;/h2&gt;

&lt;p&gt;上有單元我們實作了Hello world程式，本身程式沒什麼太大意義，主要告訴大家，nodejs如何執行，這單元我們開始實作一些有意義的功能。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;node js 可以讓你在5分鐘內寫出一個web服務器&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;什麼？五分鐘內？ &lt;br&gt;
不需要懷疑，可以很快速的實現一些基本功能這正是nodejs的魅力之一!&lt;/p&gt;

&lt;p&gt;不知道什麼是web服務器？那麼架站赫赫有名的Apache俗稱 阿帕奇 的軟體應該聽過吧! 我們要實作一個類似的服務。&lt;/p&gt;



&lt;h2 id=&quot;npm-套件-挑選你的輪子&quot;&gt;Npm 套件 - 挑選你的輪子&lt;/h2&gt;

&lt;p&gt;開始之前先來談件事，當你在製作網頁時，如果你需要做元件互動，你可能會優先考慮在你的html頁面上加掛 jquery ，儘管你知道這些東西都可以自己寫原生js，但是你依然會使用它，這是為了加快程式開發的速度，你不需再再去開發所謂的”輪子”功能，而會直接拿現的輪子裝上去。(當然大前提是輪子是優秀且情境適用的狀況下)&lt;/p&gt;

&lt;p&gt;Nodejs其中一個迷人的地方的地方，就是他擁有一個開放又成熟的第三方函式庫社群&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.npmjs.com/&quot;&gt;Npm官網&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_wiEO7TwW26UTU9IulKlaAzYQckthM7l0GqXsG4OhxZHPmeAKzBuP4qEwuaLD3J4qlbWIFPW1c_DMvDiG6knupPst5ppqY-HZS58gcaDIKKHX860S6QMq4LpNjiqrMmHIoL8b_0XPhBaF/s1600/FireShot+Capture+3+-+npm+-+https___www.npmjs.com_.png&quot; alt=&quot;enter image description here&quot; title=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;這裡面有數以萬計的輪子與各種套件提供你使用，你可以很方便的搜尋到你需要的功能，且快速的安裝他。&lt;/p&gt;

&lt;p&gt;你可以嘗試在搜尋框內搜尋你要的功能，比方你可以搜尋你常用的&lt;code&gt;jquery&lt;/code&gt;這個套件，套件頁面一般都會有簡單的說明，與安裝使用方法。&lt;/p&gt;

&lt;h2 id=&quot;使用-npm-安裝套件&quot;&gt;使用 npm 安裝套件&lt;/h2&gt;

&lt;p&gt;安裝套件的方式很簡單，nodejs提供簡單的方法讓你安裝你需要的套件。&lt;/p&gt;

&lt;p&gt;首先你可以在c槽根目錄下，新建立一個叫做myapp目錄(選c槽根目錄只是為了讓你切換路徑方便，當然你也可以直接在桌面上開新資料夾)，開啟cmd模式，把路徑切換到myapp裡面。&lt;/p&gt;

&lt;p&gt;cmd模式下輸入&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs bash&quot;&gt;&lt;span class=&quot;hljs-built_in&quot;&gt;cd&lt;/span&gt; c:/
&lt;span class=&quot;hljs-built_in&quot;&gt;cd&lt;/span&gt; myapp&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;你的cmd提示路徑應該是&lt;code&gt;c:/myapp&amp;gt;&lt;/code&gt;這代表目前工作路徑在myapp裡面。&lt;/p&gt;

&lt;p&gt;我們試著在這裡安裝你所熟悉的jquery套件，請輸入以下命令&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs cmake&quot;&gt;npm &lt;span class=&quot;hljs-keyword&quot;&gt;install&lt;/span&gt; jquery&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;之後你的cmd應該會出現一大串安裝訊息，安裝完成後，你的myapp資料夾裡會出現一個&lt;code&gt;node&lt;/code&gt;資料夾，npm的組件安裝都會放在這裡面，點進去看你會看到你安裝的jquery套件。&lt;/p&gt;

&lt;p&gt;nodejs 專案都是以資料夾為主，意思就是，今後myapp資料夾就會是node專案的根目錄，往後要備份或是給人家就直接給這一整個資料夾。(直接給資料夾不是最好的做法，這個之後再提)。&lt;/p&gt;



&lt;h2 id=&quot;使用npm下載的套件&quot;&gt;使用npm下載的套件&lt;/h2&gt;

&lt;p&gt;如果在html中使用jquery的方式，你應該會在html文件中加掛&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs xml&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-title&quot;&gt;script&lt;/span&gt; &lt;span class=&quot;hljs-attribute&quot;&gt;src&lt;/span&gt;=&lt;span class=&quot;hljs-value&quot;&gt;&quot;jquery.js&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;javascript&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-title&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;但是nodejs中可沒有html標籤讓你使用，如果你要在專案中引用jquery，必須使用&lt;code&gt;require&lt;/code&gt;方法。&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs ruby&quot;&gt;var &lt;span class=&quot;hljs-variable&quot;&gt;$ &lt;/span&gt;= &lt;span class=&quot;hljs-keyword&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;&#39;jquery&#39;&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;require&lt;/code&gt; 會自動幫你載入套件，對應的正確的npm套件資料夾&lt;/p&gt;

&lt;p&gt;&lt;em&gt;上述用jquery舉例只是，讓你了解差異，實際上nodejs中沒有dom可以操作，所以jquery並沒有什麼用途(原諒我這個無聊的例子XD)&lt;/em&gt;&lt;/p&gt;



&lt;h2 id=&quot;實作你的第一個nodejs服務&quot;&gt;實作你的第一個Nodejs服務&lt;/h2&gt;

&lt;p&gt;到此相信你對nodejs使用上應該有一點心得了，接下來開始進入正題，我們要實作一個web服務器。&lt;/p&gt;

&lt;p&gt;首先開啟一個資料夾，(要在哪裡開或者資料夾叫什麼名字，還是真的很懶繼續使用剛剛的myapp都無所謂，只要你確定可以在cmd中正確的路徑下執行就可以)，接著開一隻新的js寫下你的程式。(js檔名要取什麼名字都無所謂，大部分的人會習慣以app. js當作入口)&lt;/p&gt;

&lt;p&gt;首先安裝一個叫做&lt;code&gt;express&lt;/code&gt;的套件(記得要在該安裝的資料夾中安裝喔)&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs cmake&quot;&gt;npm &lt;span class=&quot;hljs-keyword&quot;&gt;install&lt;/span&gt; express&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;開啟一支js檔案，輸入以下程式&lt;/p&gt;



&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs php&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;var&lt;/span&gt; express = &lt;span class=&quot;hljs-keyword&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;&#39;express&#39;&lt;/span&gt;);

&lt;span class=&quot;hljs-keyword&quot;&gt;var&lt;/span&gt; app = express();

app.&lt;span class=&quot;hljs-keyword&quot;&gt;use&lt;/span&gt;(express.&lt;span class=&quot;hljs-keyword&quot;&gt;static&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;&#39;www&#39;&lt;/span&gt;));

app.listen(&lt;span class=&quot;hljs-number&quot;&gt;80&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;好了之後存js檔，別吃驚，只要短短4號程式，這就是 web服務器。&lt;/p&gt;

&lt;p&gt;解釋一下code，第一行的&lt;code&gt;var express = require(&#39;express&#39;);&lt;/code&gt; 很明顯就是取用剛剛安裝的套件，我們把它取出並設為express變數(變數名是不是叫做&lt;code&gt;express&lt;/code&gt;一樣不會有人管你，一般慣例說了方便辨認，變數名稱都會取跟套件一樣的名字)&lt;/p&gt;

&lt;p&gt;第二行的&lt;code&gt;var app = express();&lt;/code&gt;，常很多新手忘記作，取出的express是一個函數(function)，我們必須要執行他才會取回執行結果，這行的意思是請&lt;code&gt;exptess&lt;/code&gt;開個服務器給你，我們把它放在&lt;code&gt;app&lt;/code&gt;變數裡。&lt;/p&gt;

&lt;p&gt;既然作個web服務器，總是要開個資料夾來放你的html文件與css，image資源，第三行的&lt;code&gt;app.use(express.static(&#39;www&#39;));&lt;/code&gt;意思是，我們要把www資料夾當成網站的根目錄。&lt;/p&gt;

&lt;p&gt;第四行的&lt;code&gt;app.listen(80);&lt;/code&gt;是開叫server開啟80port去作連線服務，就是所謂的http服務。&lt;/p&gt;

&lt;p&gt;執行前記得在你的專案資料夾建立一個&lt;code&gt;www&lt;/code&gt;的目錄，並把你的 index. html還有相關素材放進去。&lt;/p&gt;

&lt;p&gt;最後一個步驟，執行它!!&lt;/p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot; hljs avrasm&quot;&gt;node app&lt;span class=&quot;hljs-preprocessor&quot;&gt;.js&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;畫面上應該沒有反應，很正常，因為我們沒有console. log任何訊息。&lt;/p&gt;

&lt;p&gt;這時候你可以很開心的開啟你的瀏覽器，網站輸入&lt;code&gt;http://127.0.0.1/&lt;/code&gt;，如果你有在www資料夾中放入你的index. html，你應該可以看到你的首頁。&lt;/p&gt;

&lt;p&gt;恭喜你!你可以寫自己的web服務器了！&lt;/p&gt;&lt;/div&gt;&lt;/body&gt;
&lt;/html&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/8646971819832644073/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/8646971819832644073' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/8646971819832644073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/8646971819832644073'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/02/nodejs_4.html' title='朝向Node.js工程師之路 (三)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_wiEO7TwW26UTU9IulKlaAzYQckthM7l0GqXsG4OhxZHPmeAKzBuP4qEwuaLD3J4qlbWIFPW1c_DMvDiG6knupPst5ppqY-HZS58gcaDIKKHX860S6QMq4LpNjiqrMmHIoL8b_0XPhBaF/s72-c/FireShot+Capture+3+-+npm+-+https___www.npmjs.com_.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-587727328938562654</id><published>2016-02-01T08:04:00.001-08:00</published><updated>2016-02-01T08:11:22.691-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="朝向前端工程師之路"/><title type='text'>朝向Node.js工程師之路 (二)</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
&lt;title&gt;朝向Node.js工程師之路 (二)&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/res-min/themes/base.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;&lt;div class=&quot;container&quot;&gt;&lt;h1 id=&quot;朝向前端工程師之路-hello-nodejs&quot;&gt;朝向前端工程師之路 - Hello Nodejs !!&lt;/h1&gt;

&lt;p&gt;這個章節，會帶著你會把Nodejs安裝完成，並寫下你的第一支Nodejs helloWorld程式。&lt;/p&gt;

&lt;p&gt;以下流程會以 win 系統為主，如果你是mac 系統，關於安裝與執行部分我相信網路上資源很多，可以自行比照，除了系統執行指令不同，流程都是一樣的。&lt;/p&gt;

&lt;h2 id=&quot;安裝&quot;&gt;安裝&lt;/h2&gt;

&lt;p&gt;首先到nodejs 官網，下載建議的版本，目前nodejs最新版本是v5.5.0，不過在這裡建議大家用v4.2.6(也是官方建議，終究也看過太多前輩踩了雷又退回來)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKb3fZarzAtHhkl_0GoT53NqX7bl7-ee0q6q3MtdCpaKkuo6JSkjCBDbIOt3QcXxl337GPTpn09CCdQyjZEbicMqwJzdAevf1BQkXAA_Tkepwc5hEg9do6U9df8H2PyEq0VrUNyypcVEVD/s1600/FireShot+Capture+2+-+Node.js+-+https___nodejs.org_en_.png&quot; alt=&quot;enter image description here&quot; title=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;Install直接下一步到底就好不用想太多&lt;/p&gt;

&lt;h2 id=&quot;執行環境-cmd&quot;&gt;執行環境 cmd&lt;/h2&gt;

&lt;p&gt;這裡有些東西你必須得了解，這部分是避不掉的。&lt;/p&gt;

&lt;p&gt;首先就算你是win系統，你還是得學習所謂的&lt;strong&gt;命令模式&lt;/strong&gt;，就是所謂的cmd下的指令(以前我都說這是dos模式，沒有像win那樣有漂亮的視覺化介面可以操作)，nodejs都是在cmd下執行，別擔心!用久了你會發覺反而比視窗介面方便又更快速。&lt;/p&gt;

&lt;p&gt;不過先不用太擔憂，不需要全部學習，我們指需要知道如何在正確的地方(路徑)執行你的js程式就好了。&lt;/p&gt;

&lt;p&gt;首先我們先試著啟動cmd模式，在桌面的搜尋框內鍵入&lt;code&gt;cmd&lt;/code&gt;(win10會在桌面左下角，搜尋執行的程式那個框就是)，找到後按下enter開啟他。&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiQcq8ibmBaHBJd8qMSvGk4sv1OyiHR6FMprFVgSj7k3wnVKR8oTAHvo1pnwd0uFB6AOPjnJP2ku7QXjvpzGEVFZPS9HQ3JKIyD8DKLMR3nmKxrT360Z1c8L9nXkaaSNI_7tg1A4FWKAZg/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E6%2588%25AA%25E5%259C%2596+2016-02-01+22.37.35.jpg&quot; alt=&quot;enter image description here&quot; title=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;正常來說，你會看到一個視窗，裡面只有黑色底淺色字，以後你必須在這裡鍵入正確的指令去執行你的js程式，我知道對於不懂電腦的人，看到這個畫面就覺得駭客高手才會進來這裡，其實所謂的cmd模式不過就是把你以前在桌面上的雙擊開啟程式動作，變成在cmd輸入指令開啟程式。&lt;/p&gt;

&lt;p&gt;首先為了學習先來惡搞一下，我們在cmd下輸入&lt;code&gt;app&lt;/code&gt;後按下enter執行他(或者你亂打一些字試試)&lt;/p&gt;

&lt;p&gt;如想像的，你馬上會得到執行錯誤，原因是，你根本沒有app這個程式，用桌面比喻就是你桌面上沒有app這個icon，所以系統回覆你錯誤訊息。&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvBF6_mychvZr4v7hguD7Ki-5oBfPltINOZTzSda7rUtQUm1bF0VCmkuLG5zRTLi6_ir5Eea6F5MXveHajWS3C8xL7_G81lCf7PUh1TiQQqSFNCZ1VwFmLPvX_unaxEszylhW4tflLU4yL/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E6%2588%25AA%25E5%259C%2596+2016-02-01+23.53.03.jpg&quot; alt=&quot;enter image description here&quot; title=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;由此可得知，往後你如果看到這個訊息，代表你應該是拼錯打錯字，或者這個路徑下沒這個檔案。&lt;/p&gt;

&lt;p&gt;目前你看到的命令列，代表你所在的資料路徑位置，假如是&lt;code&gt;c:/xxx/aaa/&lt;/code&gt;這代表現在開啟的是c槽的xxx資料夾裡的aaa資料夾，如果你想看這個資料夾裡有什麼檔案，你可以輸入 &lt;code&gt;dir&lt;/code&gt;按下enter ，會列出這個資料夾裡的檔案。如果你想要回到上一層目錄，你可以輸入&lt;code&gt;cd ..&lt;/code&gt;，這是回到上一層資料夾的意思，反過來說，如果要再進去某個資料夾，你可以輸入&lt;code&gt;cd bbb&lt;/code&gt;，這代表你要進入 bbb 這層資料夾。如果需要換到d槽，只要使用&lt;code&gt;cd d:/&lt;/code&gt;就可以直接切換。&lt;/p&gt;

&lt;p&gt;上面的路徑使用，熟悉後你應該可以理解，&lt;code&gt;cd&lt;/code&gt;這是路徑的指令，後面接的，就是要執行的檔案或路徑名。&lt;/p&gt;

&lt;p&gt;以上為何要說明這些無聊的路徑管理呢，以下說明nodejs執行的狀況。&lt;/p&gt;

&lt;p&gt;你寫了某隻js程式，假設是做app. js，你需要用nodejs去執行他，你只要輸入 &lt;code&gt;node app. js&lt;/code&gt; ,前面的node是指令，之前到官網下載安裝完成後就會有這指令，後面的app. js 是你要執行的程式路徑。&lt;/p&gt;

&lt;h2 id=&quot;開始第一支nodejs程式&quot;&gt;開始第一支Nodejs程式&lt;/h2&gt;

&lt;p&gt;瞭解如何在cmd下工作後，我們開始嘗試寫下你的第一支nodejs程式，首先用你習慣的文件編輯程式，(你可以使用Dreamweaver甚至是記事本，任何可以建立文件的軟體都可以，一般我們會建議你使用sublime，這是目前最多人使用的js編輯器)，打開一個檔案，輸入以下程式&lt;/p&gt;



&lt;p&gt;&lt;code&gt; &lt;br&gt;
console. log(&quot;Hello World Nodejs!!&quot;);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;如果你有在寫js，應該會知道，這個js會在主控台輸出你要的物件&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;輸入完成後，存檔名&lt;code&gt;app. js&lt;/code&gt;，為了方便執行，你可以把它拉到c槽根目錄。&lt;/p&gt;

&lt;p&gt;接下來我們要用cmd到c槽下去執行他&lt;/p&gt;

&lt;p&gt;打開剛剛說明國的cmd模式，由於你的app. js，放在c槽根目錄，所以我們必須先切換到正確的路徑再執行他，輸入&lt;code&gt;cd c:&lt;/code&gt;切換到c槽根目錄，路徑切換成功後，你可以明確的看到cmd提升為c:\工作路徑。&lt;/p&gt;

&lt;p&gt;執行你的js程式&lt;/p&gt;

&lt;p&gt;&lt;code&gt;node app. js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;你會看到cmd下一行輸出&lt;code&gt;Hello World Nodejs!!&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;恭喜你!你完成你的第一支nodejs程式了!!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDaRQD4R6vIWBd-qJO6xYLIwXfHUKkz0B7PzDWKj40GI5HG0p4eBZnHAP3B4GuUtMvasbVktXbFV6dmFE_Pc6qvZEEn9x4PRQg5KWuKJ1D_xaDEAIjnmxxKFgX9ZQH6vFATuNLJFPs06-N/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E6%2588%25AA%25E5%259C%2596+2016-02-01+23.57.46.jpg&quot; alt=&quot;enter image description here&quot; title=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;我知道這是一支很無聊的程式XD ，但是好歹他幫你理解執行環境，讓你邁出第一步，下一章節我們會開始作點有意義的事。&lt;/p&gt;

&lt;p&gt;Ps. 如果以上這個簡單的流程與helloWorl程式，如果實作上依然遇到錯誤？ &lt;br&gt;
一般而言初學者最常遇到執行路徑錯誤問題，請一定要確認你的執行路徑沒有錯，比方你的app.js儲存在c:/但是你卻在d:/執行，當然是行不通的。&lt;/p&gt;

&lt;p&gt;如果你不想切換路徑，另一種方法是直接指定絕對路徑，比方你的js放在&lt;code&gt;c:/home/app.js&lt;/code&gt; &lt;br&gt;
你可以直接指定路徑執行 &lt;code&gt;node c:/home/app.js&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/body&gt;
&lt;/html&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/587727328938562654/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/587727328938562654' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/587727328938562654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/587727328938562654'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/02/nodejs_86.html' title='朝向Node.js工程師之路 (二)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKb3fZarzAtHhkl_0GoT53NqX7bl7-ee0q6q3MtdCpaKkuo6JSkjCBDbIOt3QcXxl337GPTpn09CCdQyjZEbicMqwJzdAevf1BQkXAA_Tkepwc5hEg9do6U9df8H2PyEq0VrUNyypcVEVD/s72-c/FireShot+Capture+2+-+Node.js+-+https___nodejs.org_en_.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-4706169079180213628</id><published>2016-01-29T06:46:00.001-08:00</published><updated>2016-01-29T06:55:23.075-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="朝向前端工程師之路"/><title type='text'>朝向Node.js工程師之路 (一)</title><content type='html'>&lt;h1 id=&quot;朝向前端工程師之路-nodejs序章&quot;&gt;
朝向前端工程師之路 - Nodejs序章&lt;/h1&gt;
首先要說，我打算開始寫一系列文章，對象是給會寫一些程式的網頁設計師，好讓他們可以入門所謂的前工程師 (或許這個詞只是虛招，但是很多教案都用這當幌子)，所以如果你已經知道一些 Node.js 並可以子自己寫一些簡單的小東西，那你就可以不需要繼續看下去了。&lt;br /&gt;
&lt;br /&gt;
你知道Nodejs其實發展一段時間了，也知道它很熱門，想理解卻一直沒有餘力 ，那麼接下來的文章，或許可以幫助你入門。我儘量用最單純簡單的做法，帶著各位實現一些功能，希望可以讓你快速獲得成就感，進而繼續學下去。&lt;br /&gt;
&lt;br /&gt;
首先來談談，你一定聽過&lt;strong&gt;不會 Nodejs ，不敢自稱 前端工程師 &lt;/strong&gt;這句話，到底Nodejs可以作什麼? 為何前端工程師都得學? &lt;br /&gt;
&lt;img alt=&quot;enter image description here&quot; src=&quot;http://www.kingsirblog.com/wp-content/uploads/2015/11/nodejs.png&quot; title=&quot;&quot; /&gt; &lt;br /&gt;
&lt;a href=&quot;http://www.infoq.com/cn/articles/what-is-nodejs&quot;&gt;Nodejs介紹與歷史&lt;/a&gt;&lt;br /&gt;
上面介紹正常來說，應該有看沒有懂，以下簡單說明並回答上述問題。 &lt;br /&gt;
&lt;br /&gt;
到底Nodejs可以幹嘛? 我覺得Nodejs什麼都能做!! 你可能對這個回答感到疑惑，實際上真是如此，Nodejs可以讓電腦看懂你寫的 Javascript，你可以用Javascript去叫你電腦做任何事，以前你的認知Javascript應該是活在瀏覽器的世界裡，寫js(之後的Javascript我都簡稱js)你可能先做一個html檔案，並掛上js(或是直接寫在html頁面裡)。&lt;br /&gt;
&lt;br /&gt;
你必須要有瀏覽器環境才有辦法看到結果，因為只有瀏覽器才能看懂你的js，能做的事就是用js去指揮你的瀏覽器去做應該要做的事，如果你是網頁設計師絕大部分都是用控制你dom或是css (另外我還是要不厭其煩的說一下jq也是js….)&lt;br /&gt;
&lt;br /&gt;
安裝 Nodejs 後會在你電腦上裝上google v8引擎，總之就是讓你的電腦可以直接看懂js，不須再透過瀏覽器，終究瀏覽器能做的事很有限，實際上電腦可以做很多事，比方你可以寫一些自動化叫你電腦每天都去某些網站幫你抓一些檔案回來(機器人或網路蜘蛛)，你可以自己開發一些執行檔或常駐服務(很久以前我做了自動幫我上班打卡的小程式XD，大家不可以學喔!)，可以開發app(是真的不要懷疑，請google Codova這個詞)，可以作物聯網(我最近都在作XD)，開發網路遊戲(這還算是簡單的喔!)，作網站就不須說了，你甚至可以作自己的Ftp (不是自己抓軟體來裝喔，是自己寫一個FTP)，或者是自己寫一個像是阿帕契一樣的web服務器(幾分鐘內就可以寫好，之後文章我會教大家作)，總之需要電腦作的事Nodej幾乎都可以辦到!!&lt;br /&gt;
&lt;br /&gt;
包含如果你有再用scss寫css，可能用一些奇奇怪怪的軟體(反正按照教學裝了，scss存檔就自動變css了 XD )，這些軟體功能都可以自己做。&lt;br /&gt;
&lt;br /&gt;
另外一個問題，為何nodejs容易跟網頁設計師發生關係(笑)，我想這單存只是因為js，網頁設計師幾乎都有js基礎，入門nodejs自然門檻變得很低，我想這對大家是一個很棒的機會，從只會瀏覽器的網頁設計師，逃到軟體工程師的絕佳路徑。&lt;br /&gt;
&lt;br /&gt;
小弟我很明顯是從 &lt;strong&gt;網頁製作 跳到 軟體開發&lt;/strong&gt; ，不瞞各位，薪水確實也是三級跳，因為現在什麼都能作呀!&lt;br /&gt;
&lt;br /&gt;
實際上Nodejs也已經不是很新鮮的東西了，曾經一段時間，他也分分合合，直到今日發展也穩定了，最新是 5 (不過我建議大家用4.2比較不會踩雷)，不過Nodejs的人才市場卻很缺乏，我們公司一直找不到所謂的資深人才，想當年我面試跟公司說，我自學一年多，專案人員聽到多感動，回我一句”這就是資深人員了” ，讓我錯愕了一下XD，所以現在開始學習正是好機會!!&lt;br /&gt;
&lt;br /&gt;
待續…….   下一階段就進入實作第一個程式了!&lt;br /&gt;
&lt;br /&gt;
ps. 我第一次用stackedit寫部落格真是開心又方便，大推薦這個工具XD</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/4706169079180213628/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/4706169079180213628' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4706169079180213628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4706169079180213628'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2016/01/nodejs.html' title='朝向Node.js工程師之路 (一)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-5094268911033644987</id><published>2015-10-05T00:25:00.002-07:00</published><updated>2015-10-05T02:38:56.381-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>Nodejs 影音轉檔 - 使用 FFmpeg + fluent-ffmpeg 錯誤問題</title><content type='html'>用Nodejs作影音轉檔 ，我使用 FFmpeg + fluent-ffmpeg (2.0.1)&lt;br /&gt;
遇到某些檔案會有以下錯誤，導致轉檔錯誤&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;TypeError: Object.keys called on non-object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;at Function.keys (native)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;at e:\Mercurial\nodejs\iflicks\node_modules\fluent-ffmpeg\lib\ffprobe.js:153:42&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;at Array.forEach (native)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;at handleExit (e:\Mercurial\nodejs\iflicks\node_modules\fluent-ffmpeg\lib\ffprobe.js:152:46)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;at ChildProcess. (e:\Mercurial\nodejs\iflicks\node_modules\fluent-ffmpeg\lib\ffprobe.js:191:11)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;at ChildProcess.emit (events.js:110:17)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;at Process.ChildProcess._handle.onexit (child_process.js:1074:12)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;6 Jul 16:07:44 - [nodemon] app crashed - waiting for file changes before starting...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif; font-size: 14px; line-height: 22.4px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
如果遇到這種問題，救急方法可以先去node_modules\fluent-ffmpeg\lib修正&amp;nbsp;ffprobe.js&lt;br /&gt;
&lt;br /&gt;
約第15行加上&lt;br /&gt;
function parseFfprobeOutput(out) {&lt;br /&gt;
&amp;nbsp; var lines = out.split(/\r\n|\r|\n/);&lt;br /&gt;
&amp;nbsp; var data = {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; streams: []&lt;br /&gt;
&amp;nbsp; };&lt;br /&gt;
&amp;nbsp;&lt;b&gt; lines = lines.filter(Boolean);&lt;/b&gt; &amp;nbsp;// &amp;lt;== 加上這行&lt;br /&gt;
&lt;br /&gt;
目前官方沒有更新這個錯誤，只好先暫時修正錯誤</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/5094268911033644987/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/5094268911033644987' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/5094268911033644987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/5094268911033644987'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2015/10/nodejs-ffmpeg-fluent-ffmpeg.html' title='Nodejs 影音轉檔 - 使用 FFmpeg + fluent-ffmpeg 錯誤問題'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-1750071677399996254</id><published>2015-09-08T19:31:00.001-07:00</published><updated>2015-09-08T19:31:44.282-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Library"/><category scheme="http://www.blogger.com/atom/ns#" term="pixijs"/><category scheme="http://www.blogger.com/atom/ns#" term="技術備忘"/><title type='text'>PIXI.js 開發Canvas在觸控裝置瀏覽器捲動不觸發問題</title><content type='html'>PIXI.js 開發Canvas的內容，預設情況在觸控裝置下需要拖曳滾動瀏覽器卷軸時，會發現無法觸發卷軸滾動事件，原因是觸控拖曳與Canvas畫面中的拖曳事件相衝突，所以PIXI把觸控事件擋掉了。&lt;br /&gt;
&lt;br /&gt;
如果你需要開啟瀏覽器拖曳滾動，可以加一行&lt;br /&gt;
&lt;br /&gt;
renderer.plugins.interaction.autoPreventDefault = false;&lt;br /&gt;
&lt;br /&gt;
renderer是你的PIXI.Renderer物件&lt;br /&gt;
如此便可開啟滾動拖曳，但是會有幾個問題需要注意&lt;br /&gt;
1.遊戲中的拖曳當然也會觸發卷軸滾動&lt;br /&gt;
2.滑鼠事件也會一起觸發，可以考慮統一使用滑鼠事件，不註冊觸控事件</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/1750071677399996254/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/1750071677399996254' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1750071677399996254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/1750071677399996254'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2015/09/pixijs-canvas.html' title='PIXI.js 開發Canvas在觸控裝置瀏覽器捲動不觸發問題'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-8687854263932090776</id><published>2014-12-02T19:11:00.000-08:00</published><updated>2014-12-02T19:13:20.077-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Demo"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="Threejs"/><title type='text'>環景VR導覽Demo</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://54.64.27.245/cain/skyBox/&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIWIVq8sA1dOcQy0opYs6JjfK-t_3RR8jSlPLB78n7tkXoz3gwgdgD1t_bLQWCeFq3wntmvEBbc-t1P0wTMCay5RwnjNjvuwWSFQalY2XI_XZPqx3P0-TBrUxZEMDN4ZvXvpspLEaCTjjb/s1600/123.jpg&quot; /&gt;&lt;/a&gt;&lt;span id=&quot;goog_655993356&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_655993357&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;span id=&quot;goog_655993348&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_655993349&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;環景VR導覽，你可以拖曳畫面觀賞實景，使用Threejs貼個天空盒就行了，由於採用WebGL，舊版IE一定是不支援，行動裝置目前IOS可以使用，Android瀏覽器還不行 ，不過相信支援也是遲早的事。 另外放了兩隻馬力歐上去，這代表你可以放置任意的說明指標或只是其他相關連結&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/8687854263932090776/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/8687854263932090776' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/8687854263932090776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/8687854263932090776'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2014/12/vrdemo.html' title='環景VR導覽Demo'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIWIVq8sA1dOcQy0opYs6JjfK-t_3RR8jSlPLB78n7tkXoz3gwgdgD1t_bLQWCeFq3wntmvEBbc-t1P0wTMCay5RwnjNjvuwWSFQalY2XI_XZPqx3P0-TBrUxZEMDN4ZvXvpspLEaCTjjb/s72-c/123.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2482626752544217754.post-4541012481100563981</id><published>2014-11-26T23:19:00.003-08:00</published><updated>2014-12-02T19:03:57.498-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="pixijs"/><category scheme="http://www.blogger.com/atom/ns#" term="專案作品"/><title type='text'>專案作品 - ITF競賽活動</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://54.64.27.245/cain/lionrungame/&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvukHtW9A-KWsn9_UxA7daXsSDhRK0w4QPbvYH3Vs4sszfr4rF-kTB6DDN9EOuLk9dNn-rYuoiek_0qJmgm2If-ISrJElR15cJimacguAW2CgzYyjgcNMsCmodiKbDuxbcBfKiksTfnJ90/s1600/1.jpg&quot; height=&quot;256&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
遊戲流程&lt;br /&gt;
1.掃描RQ Code，按下參加比賽&lt;br /&gt;
2.最多可報名5人&lt;br /&gt;
3.按下網頁上的 Start Game 按鈕，開始比賽&lt;br /&gt;
4.依照手機上的操作進行遊戲&lt;br /&gt;
&lt;br /&gt;
後面是一個很簡單的web socket交換器&lt;br /&gt;
網頁是pixijs寫的Canvas遊戲</content><link rel='replies' type='application/atom+xml' href='http://cainmaxdesign.blogspot.com/feeds/4541012481100563981/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2482626752544217754/4541012481100563981' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4541012481100563981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2482626752544217754/posts/default/4541012481100563981'/><link rel='alternate' type='text/html' href='http://cainmaxdesign.blogspot.com/2014/11/itf.html' title='專案作品 - ITF競賽活動'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvukHtW9A-KWsn9_UxA7daXsSDhRK0w4QPbvYH3Vs4sszfr4rF-kTB6DDN9EOuLk9dNn-rYuoiek_0qJmgm2If-ISrJElR15cJimacguAW2CgzYyjgcNMsCmodiKbDuxbcBfKiksTfnJ90/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>