Meteor 是一個 full-stack 的開發框架 (或者該說是平台),它可以利用一種語言 (JavaScript) 來輕鬆完成前後端的開發。是目前前景看好的選擇。
本階段的目標是:
- 了解 Meteor 是什麼樣的平台,基本架構,可以做到什麼樣的事情 (2.5 hr)
- 能夠自己獨立完成一個 Meteor 的 ToDo App (不斷的練習一樣的 App,直到完全熟悉,+10 hr)
這階段大約花 10-20 hr,可以利用一個週末的兩天時間,或是一個禮拜的晚上來完成。
| /** | |
| * This gulpfile will copy static libraries and a index.html file as well as | |
| * merge, babelify and uglify the rest of the javascript project. | |
| * | |
| * TODO: | |
| * - Separate media, libs and src with different watchers. | |
| * - Media and libs should only be copied to dist if they are different sizes. | |
| * | |
| * The expected project is to be laid out as such: | |
| * |
| import critical from 'critical'; | |
| import babelify from 'babelify'; | |
| import browserSync from 'browser-sync'; | |
| import browserify from 'browserify'; | |
| import buffer from 'vinyl-buffer'; | |
| import gulp from 'gulp'; | |
| import plugins from 'gulp-load-plugins'; | |
| import source from 'vinyl-source-stream'; |
| _self.getToken = function() { | |
| var params = { | |
| client_secret: config.credentials.ConsumerSecret, | |
| client_id: config.credentials.ConsumerKey, | |
| grant_type: 'client_credentials' | |
| //miss scope | |
| scope : 'data:read data:write bucket:create bucket:read' | |
| }; |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| var request = require('request'), //ezmode | |
| fs = require('fs'); | |
| var uploadFileName = 'tit.jpg'; // this is a local file, but could be any file or data you want to read in | |
| //ITS A BIRD I SWEAR | |
| fs.readFile('./' + uploadFileName, function read(err, data) { | |
| // hipchat appears to expect the file as a byte array | |
| // and does not support Content-Transfer-Encoding at the time of this gist's creation | |
| request.post({ |
| var rp = require('request-promise'); | |
| var id = "echo"; | |
| console.log(id); | |
| rp(options).then( | |
| function(body) { | |
| id = body.sessionId; | |
| console.log(id); | |
| }) | |
| .catch(function(response) { |
| yum install -y php56w php56w-opcache php56w-dba php56w-devel php56w-embedded php56w-enchant php56w-fpm php56w-gd php56w-imap php56w-interbase php56w-intl php56w-ldap php56w-mbstring php56w-mcrypt php56w-mssql php56w-mysqlnd php56w-odbc php56w-opcache php56w-pdo php56w-pear php56w-pecl-apcu php56w-pecl-gearman php56w-pecl-geoip php56w-pecl-imagick php56w-pecl-memcache php56w-pecl-xdebug php56w-pgsql php56w-phpdbg php56w-process php56w-pspell php56w-recode php56w-snmp php56w-soap php56w-tidy php56w-xml php56w-xmlrpc |