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'; |
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({ |