Caesar Chi - 所有的文章 - 共有 260 篇文章 搜尋時間 0.013 秒

npm i fail - 查不出原因的處理方式

2016-04-09 16:20:00 by Caesar Chi @ 熱血漢誌 [引用來源]

npm i fail - 查不出原因的處理方式經歷許多次的 npm 安裝問題,目前有幾種不同的解法。npm cache issue可能因為 npm 下載的時候,或者因為連線問題導致模組並沒有完整被安裝,但是 npm 的檢查機制就是只要存在就會跳過安裝步驟,因此當遇到安裝完成,但是執行卻無法的時候,可以嘗試著rm -rf node_modules# install againnpm i 如果是在中間...... [閱讀更多]

JavaScript 物件中快速檢查屬性

2016-04-07 11:52:00 by Caesar Chi @ 熱血漢誌 [引用來源]

JavaScript 物件中快速檢查屬性在我們一般使用 function 或者呼叫某些 api 的時候特別需要去驗證,某些值是否已經存在,或者使用者有沒有忘記傳入哪些數值進來。為了要做這件事情,通常我們會寫一堆 if 去判斷每個值有沒有出現問題。if(!formData.name){ return reject("Parameter 'name' is required");}if(!for...... [閱讀更多]

Express.js 的黑歷史及 Express 未來

2016-04-04 13:22:00 by Caesar Chi @ 熱血漢誌 [引用來源]

Express.js 的黑歷史及 Express 未來 4/5 更新, 根據讀者回饋,目前 IBM 已將 Express 及相關所有權轉移到 Node.js 基金會手中,讓 Node.js 社群能夠投入資源。 https://nodejs.org/en/blog/announcements/foundation-express-news/ E...... [閱讀更多]

[fixed] Sequelize: warning: "a promise was created in a handler but was not returned from it"

2016-03-25 18:50:00 by Caesar Chi @ 熱血漢誌 [引用來源]

Sequelize: warning: "a promise was created in a handler but was not returned from it"problem:when running sequelize, and console display error message below, accroding to sequelize issues, the informa...... [閱讀更多]

nginx config path for mac envorinment

2016-03-25 18:09:00 by Caesar Chi @ 熱血漢誌 [引用來源]

nginx for mac envorinmentif you are a mac user and have to process nginx config for your local env, there is path and url for youthere is a note for myself./usr/local/etc/nginx/nginx.confnginx clistar...... [閱讀更多]

solve ubuntu can not find temporaily apt-get update

2016-03-25 00:21:00 by Caesar Chi @ 熱血漢誌 [引用來源]

solve ubuntu can not find temporailycli,update dns to google dns server.echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/nullthen solve,sudo apt-get updateref, * apt-get update fails to...... [閱讀更多]

redux 可以使用多個不同 store 嗎?

2016-03-24 11:15:00 by Caesar Chi @ 熱血漢誌 [引用來源]

redux 可以使用多個不同 store 嗎?原本很直覺的回答這個問題是,可以的!但是透過 google 一段時間之後,才深入去找問題的本身,發現 redux 作者希望,除非必要性的需求,否則盡量使用『單一 reduxer 對應到單一 store』 ,本持的精簡的精神處理物件。處理範例方式,GitHub可以採用以下的方式,用多個不同 reducer 包裝起來// reducers.jsexport...... [閱讀更多]

nginx call php and node.js by route forward

2016-03-24 11:05:00 by Caesar Chi @ 熱血漢誌 [引用來源]

sudo apt-get install php5-fpmsudo vim /etc/php5/fpm/php.inicgi.fix_pathinfo=0safe_mode = Offrestart php fpmsudo service php5-fpm restartgenerate php file pathmkdir /usr/share/nginx/wwwvim $CKFINDER/co...... [閱讀更多]

[教學] 快快樂樂申請 ssl 憑證 certificate signed by a CA for your domain

2016-03-24 11:02:00 by Caesar Chi @ 熱血漢誌 [引用來源]

certificate signed by a CA for your domainmacbrew install opensslubuntuapt-get install opensll當 opensll 安裝好之後,就可以開始建立 key, csr 簽署檔案。mkdir /etc/ssl/localcertscd /etc/ssl/localcertsopenssl req -new -new...... [閱讀更多]

快快樂樂,上手 sketch [外掛,教學彙整]

2016-03-06 05:11:00 by Caesar Chi @ 熱血漢誌 [引用來源]

sketch 快速簡短筆記 sketch 是一個用來製作 ui, mockup 好用的工具,他的強項在於 ui, mockup 的使用上,所以跟 photoshop 的比較,大概就是 JavaScript 之於 Java, 熱狗跟狗之間的關係。 這邊做個簡短筆記,將自己搜尋到的東西推薦給大家。 plugin 管理工具 目前已經推出 ui ...... [閱讀更多]