2015年第4周技术小结
将远程服务器的文件打包下载到本地
tar -zcvf remote_shared_config.tar.gz remote_shared/config
scp -P port user@remote.org:/path/to/remote_shared_config.tar.gz /path/to/local/dir
curl
在调试 api 时,使用 curl 是一个不错的选择,
curl --data "param1=value1¶m2=value2" https://example.com/resource.cgi
curl --header "X-MyHeader: 123" www.google.com
curl --data "position=IL" http://localhost:3000/api/mobile/v1/get-some-thing
前端流程
- install nvm (Node Version Manager)
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.0/install.sh | bash
source ~/.nvm/nvm.sh
- Install Node.js: nvm install 0.10
nvm install 0.10
nvm use 0.10
- Install Grunt
npm install grunt
npm install -g grunt-cli
- Install Bower
npm install -g bower
- Node Package dependencies
npm install
- Bower Package dependencies
bower install
- Enjoy!
Run grunt serve and Grunt will automatically open http://127.0.0.1:9000/