Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reorganized and added processing websockets example

  • Loading branch information...
commit 1223a9bc6fc42a269d6d6b62c8deb196d56617bf 1 parent 708ea77
Paul Kaplan authored
Showing with 22 additions and 27,473 deletions.
  1. +22 −15 README.md
  2. +0 −33 app.js
  3. +0 −1  node_modules/.bin/express
  4. +0 −1  node_modules/.bin/jade
  5. +0 −7 node_modules/express/.npmignore
  6. +0 −805 node_modules/express/History.md
  7. +0 −22 node_modules/express/LICENSE
  8. +0 −29 node_modules/express/Makefile
  9. +0 −145 node_modules/express/Readme.md
  10. +0 −416 node_modules/express/bin/express
  11. +0 −2  node_modules/express/index.js
  12. +0 −79 node_modules/express/lib/express.js
  13. +0 −582 node_modules/express/lib/http.js
  14. +0 −52 node_modules/express/lib/https.js
  15. +0 −323 node_modules/express/lib/request.js
  16. +0 −460 node_modules/express/lib/response.js
  17. +0 −53 node_modules/express/lib/router/collection.js
  18. +0 −398 node_modules/express/lib/router/index.js
  19. +0 −70 node_modules/express/lib/router/methods.js
  20. +0 −88 node_modules/express/lib/router/route.js
  21. +0 −152 node_modules/express/lib/utils.js
  22. +0 −460 node_modules/express/lib/view.js
  23. +0 −40 node_modules/express/lib/view/partial.js
  24. +0 −210 node_modules/express/lib/view/view.js
  25. +0 −11 node_modules/express/node_modules/connect/.npmignore
  26. +0 −24 node_modules/express/node_modules/connect/LICENSE
  27. +0 −2  node_modules/express/node_modules/connect/index.js
  28. +0 −81 node_modules/express/node_modules/connect/lib/cache.js
  29. +0 −106 node_modules/express/node_modules/connect/lib/connect.js
  30. +0 −218 node_modules/express/node_modules/connect/lib/http.js
  31. +0 −47 node_modules/express/node_modules/connect/lib/https.js
  32. +0 −46 node_modules/express/node_modules/connect/lib/index.js
  33. +0 −93 node_modules/express/node_modules/connect/lib/middleware/basicAuth.js
  34. +0 −196 node_modules/express/node_modules/connect/lib/middleware/bodyParser.js
  35. +0 −163 node_modules/express/node_modules/connect/lib/middleware/compiler.js
  36. +0 −46 node_modules/express/node_modules/connect/lib/middleware/cookieParser.js
  37. +0 −105 node_modules/express/node_modules/connect/lib/middleware/csrf.js
  38. +0 −222 node_modules/express/node_modules/connect/lib/middleware/directory.js
  39. +0 −100 node_modules/express/node_modules/connect/lib/middleware/errorHandler.js
  40. +0 −76 node_modules/express/node_modules/connect/lib/middleware/favicon.js
  41. +0 −80 node_modules/express/node_modules/connect/lib/middleware/limit.js
  42. +0 −299 node_modules/express/node_modules/connect/lib/middleware/logger.js
  43. +0 −38 node_modules/express/node_modules/connect/lib/middleware/methodOverride.js
  44. +0 −100 node_modules/express/node_modules/connect/lib/middleware/profiler.js
  45. +0 −40 node_modules/express/node_modules/connect/lib/middleware/query.js
  46. +0 −34 node_modules/express/node_modules/connect/lib/middleware/responseTime.js
  47. +0 −379 node_modules/express/node_modules/connect/lib/middleware/router.js
  48. +0 −345 node_modules/express/node_modules/connect/lib/middleware/session.js
  49. +0 −126 node_modules/express/node_modules/connect/lib/middleware/session/cookie.js
  50. +0 −131 node_modules/express/node_modules/connect/lib/middleware/session/memory.js
  51. +0 −137 node_modules/express/node_modules/connect/lib/middleware/session/session.js
  52. +0 −87 node_modules/express/node_modules/connect/lib/middleware/session/store.js
  53. +0 −225 node_modules/express/node_modules/connect/lib/middleware/static.js
  54. +0 −175 node_modules/express/node_modules/connect/lib/middleware/staticCache.js
  55. +0 −44 node_modules/express/node_modules/connect/lib/middleware/vhost.js
  56. +0 −79 node_modules/express/node_modules/connect/lib/patch.js
  57. +0 −75 node_modules/express/node_modules/connect/lib/public/directory.html
  58. +0 −13 node_modules/express/node_modules/connect/lib/public/error.html
  59. BIN  node_modules/express/node_modules/connect/lib/public/favicon.ico
  60. BIN  node_modules/express/node_modules/connect/lib/public/icons/page.png
  61. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_add.png
  62. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_attach.png
  63. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_code.png
  64. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_copy.png
  65. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_delete.png
  66. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_edit.png
  67. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_error.png
  68. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_excel.png
  69. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_find.png
  70. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_gear.png
  71. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_go.png
  72. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_green.png
  73. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_key.png
  74. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png
  75. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_link.png
  76. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png
  77. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_paste.png
  78. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_red.png
  79. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png
  80. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_save.png
  81. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white.png
  82. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png
  83. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png
  84. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png
  85. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png
  86. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png
  87. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png
  88. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png
  89. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png
  90. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png
  91. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png
  92. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png
  93. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png
  94. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png
  95. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png
  96. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png
  97. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png
  98. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png
  99. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png
  100. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png
  101. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png
  102. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png
  103. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png
  104. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png
  105. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png
  106. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png
  107. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png
  108. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png
  109. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png
  110. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png
  111. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png
  112. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png
  113. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png
  114. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png
  115. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png
  116. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png
  117. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png
  118. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png
  119. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png
  120. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png
  121. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png
  122. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png
  123. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png
  124. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png
  125. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png
  126. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png
  127. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png
  128. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png
  129. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png
  130. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png
  131. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png
  132. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png
  133. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png
  134. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png
  135. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png
  136. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png
  137. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_word.png
  138. BIN  node_modules/express/node_modules/connect/lib/public/icons/page_world.png
  139. +0 −141 node_modules/express/node_modules/connect/lib/public/style.css
  140. +0 −451 node_modules/express/node_modules/connect/lib/utils.js
  141. +0 −4 node_modules/express/node_modules/connect/node_modules/formidable/.npmignore
  142. +0 −4 node_modules/express/node_modules/connect/node_modules/formidable/.travis.yml
  143. +0 −14 node_modules/express/node_modules/connect/node_modules/formidable/Makefile
  144. +0 −303 node_modules/express/node_modules/connect/node_modules/formidable/Readme.md
  145. +0 −3  node_modules/express/node_modules/connect/node_modules/formidable/TODO
  146. +0 −70 node_modules/express/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js
  147. +0 −43 node_modules/express/node_modules/connect/node_modules/formidable/example/post.js
  148. +0 −48 node_modules/express/node_modules/connect/node_modules/formidable/example/upload.js
  149. +0 −1  node_modules/express/node_modules/connect/node_modules/formidable/index.js
  150. +0 −61 node_modules/express/node_modules/connect/node_modules/formidable/lib/file.js
  151. +0 −378 node_modules/express/node_modules/connect/node_modules/formidable/lib/incoming_form.js
  152. +0 −3  node_modules/express/node_modules/connect/node_modules/formidable/lib/index.js
  153. +0 −312 node_modules/express/node_modules/connect/node_modules/formidable/lib/multipart_parser.js
  154. +0 −25 node_modules/express/node_modules/connect/node_modules/formidable/lib/querystring_parser.js
  155. +0 −6 node_modules/express/node_modules/connect/node_modules/formidable/lib/util.js
  156. +0 −29 node_modules/express/node_modules/connect/node_modules/formidable/package.json
  157. +0 −19 node_modules/express/node_modules/connect/node_modules/formidable/test/common.js
  158. +0 −1  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt
  159. +0 −1  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt
  160. +0 −3  ...es/express/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md
  161. +0 −3  node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js
  162. +0 −21 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js
  163. +0 −72 node_modules/express/node_modules/connect/node_modules/formidable/test/fixture/multipart.js
  164. +0 −89 node_modules/express/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js
  165. +0 −24 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/common.js
  166. +0 −80 ...dules/express/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js
  167. +0 −104 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js
  168. +0 −726 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js
  169. +0 −50 node_modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js
  170. +0 −45 ..._modules/express/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js
  171. +0 −72 ..._modules/express/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js
  172. +0 −2  node_modules/express/node_modules/connect/node_modules/formidable/test/run.js
  173. +0 −63 node_modules/express/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js
  174. +0 −47 node_modules/express/node_modules/connect/node_modules/formidable/tool/record.js
  175. +0 −49 node_modules/express/node_modules/connect/package.json
  176. +0 −1  node_modules/express/node_modules/connect/test/fixtures/.hidden
  177. 0  node_modules/express/node_modules/connect/test/fixtures/directory/.hidden
  178. +0 −19 node_modules/express/node_modules/mime/LICENSE
  179. +0 −50 node_modules/express/node_modules/mime/README.md
  180. +0 −92 node_modules/express/node_modules/mime/mime.js
  181. +0 −40 node_modules/express/node_modules/mime/package.json
  182. +0 −79 node_modules/express/node_modules/mime/test.js
  183. +0 −1,479 node_modules/express/node_modules/mime/types/mime.types
  184. +0 −43 node_modules/express/node_modules/mime/types/node.types
  185. +0 −2  node_modules/express/node_modules/mkdirp/.gitignore.orig
  186. +0 −5 node_modules/express/node_modules/mkdirp/.gitignore.rej
  187. +0 −2  node_modules/express/node_modules/mkdirp/.npmignore
  188. +0 −21 node_modules/express/node_modules/mkdirp/LICENSE
  189. +0 −54 node_modules/express/node_modules/mkdirp/README.markdown
  190. +0 −6 node_modules/express/node_modules/mkdirp/examples/pow.js
  191. +0 −6 node_modules/express/node_modules/mkdirp/examples/pow.js.orig
  192. +0 −19 node_modules/express/node_modules/mkdirp/examples/pow.js.rej
  193. +0 −79 node_modules/express/node_modules/mkdirp/index.js
  194. +0 −37 node_modules/express/node_modules/mkdirp/package.json
  195. +0 −38 node_modules/express/node_modules/mkdirp/test/chmod.js
  196. +0 −37 node_modules/express/node_modules/mkdirp/test/clobber.js
  197. +0 −28 node_modules/express/node_modules/mkdirp/test/mkdirp.js
  198. +0 −32 node_modules/express/node_modules/mkdirp/test/perm.js
  199. +0 −39 node_modules/express/node_modules/mkdirp/test/perm_sync.js
  200. +0 −41 node_modules/express/node_modules/mkdirp/test/race.js
  201. +0 −32 node_modules/express/node_modules/mkdirp/test/rel.js
  202. +0 −27 node_modules/express/node_modules/mkdirp/test/sync.js
  203. +0 −28 node_modules/express/node_modules/mkdirp/test/umask.js
  204. +0 −27 node_modules/express/node_modules/mkdirp/test/umask_sync.js
  205. +0 −6 node_modules/express/node_modules/qs/.gitmodules
  206. +0 −1  node_modules/express/node_modules/qs/.npmignore
  207. +0 −4 node_modules/express/node_modules/qs/.travis.yml
  208. +0 −73 node_modules/express/node_modules/qs/History.md
  209. +0 −5 node_modules/express/node_modules/qs/Makefile
  210. +0 −54 node_modules/express/node_modules/qs/Readme.md
  211. +0 −17 node_modules/express/node_modules/qs/benchmark.js
  212. +0 −51 node_modules/express/node_modules/qs/examples.js
  213. +0 −2  node_modules/express/node_modules/qs/index.js
  214. +0 −264 node_modules/express/node_modules/qs/lib/querystring.js
  215. +0 −30 node_modules/express/node_modules/qs/package.json
  216. +0 −2  node_modules/express/node_modules/qs/test/mocha.opts
  217. +0 −167 node_modules/express/node_modules/qs/test/parse.js
  218. +0 −103 node_modules/express/node_modules/qs/test/stringify.js
  219. +0 −74 node_modules/express/package.json
  220. +0 −35 node_modules/express/testing/foo/app.js
  221. +0 −9 node_modules/express/testing/foo/package.json
  222. +0 −8 node_modules/express/testing/foo/public/stylesheets/style.css
  223. +0 −10 node_modules/express/testing/foo/routes/index.js
  224. +0 −2  node_modules/express/testing/foo/views/index.jade
  225. +0 −6 node_modules/express/testing/foo/views/layout.jade
  226. +0 −43 node_modules/express/testing/index.js
  227. +0 −2,971 node_modules/express/testing/public/test.txt
  228. +0 −1  node_modules/express/testing/views/page.html
  229. +0 −3  node_modules/express/testing/views/page.jade
  230. +0 −1  node_modules/express/testing/views/test.md
  231. +0 −1  node_modules/express/testing/views/user/index.jade
  232. +0 −1  node_modules/express/testing/views/user/list.jade
  233. +0 −15 node_modules/jade/.npmignore
  234. +0 −22 node_modules/jade/LICENSE
  235. +0 −147 node_modules/jade/bin/jade
  236. +0 −4 node_modules/jade/index.js
  237. +0 −3,356 node_modules/jade/jade.js
  238. +0 −436 node_modules/jade/jade.md
  239. +0 −2  node_modules/jade/jade.min.js
  240. +0 −553 node_modules/jade/lib/compiler.js
  241. +0 −18 node_modules/jade/lib/doctypes.js
  242. +0 −97 node_modules/jade/lib/filters.js
  243. +0 −1  node_modules/jade/lib/index.js
  244. +0 −28 node_modules/jade/lib/inline-tags.js
  245. +0 −237 node_modules/jade/lib/jade.js
  246. +0 −743 node_modules/jade/lib/lexer.js
  247. +0 −33 node_modules/jade/lib/nodes/block-comment.js
  248. +0 −121 node_modules/jade/lib/nodes/block.js
  249. +0 −43 node_modules/jade/lib/nodes/case.js
  250. +0 −35 node_modules/jade/lib/nodes/code.js
  251. +0 −32 node_modules/jade/lib/nodes/comment.js
  252. +0 −29 node_modules/jade/lib/nodes/doctype.js
  253. +0 −35 node_modules/jade/lib/nodes/each.js
  254. +0 −35 node_modules/jade/lib/nodes/filter.js
  255. +0 −20 node_modules/jade/lib/nodes/index.js
  256. +0 −32 node_modules/jade/lib/nodes/literal.js
  257. +0 −35 node_modules/jade/lib/nodes/mixin.js
  258. +0 −25 node_modules/jade/lib/nodes/node.js
  259. +0 −143 node_modules/jade/lib/nodes/tag.js
  260. +0 −36 node_modules/jade/lib/nodes/text.js
  261. +0 −680 node_modules/jade/lib/parser.js
  262. +0 −127 node_modules/jade/lib/runtime.js
  263. +0 −19 node_modules/jade/lib/self-closing.js
  264. +0 −49 node_modules/jade/lib/utils.js
  265. +0 −4 node_modules/jade/node_modules/commander/.npmignore
  266. +0 −4 node_modules/jade/node_modules/commander/.travis.yml
  267. +0 −99 node_modules/jade/node_modules/commander/History.md
  268. +0 −7 node_modules/jade/node_modules/commander/Makefile
  269. +0 −263 node_modules/jade/node_modules/commander/Readme.md
  270. +0 −2  node_modules/jade/node_modules/commander/index.js
  271. +0 −992 node_modules/jade/node_modules/commander/lib/commander.js
  272. +0 −38 node_modules/jade/node_modules/commander/package.json
  273. +0 −2  node_modules/jade/node_modules/mkdirp/.gitignore.orig
  274. +0 −5 node_modules/jade/node_modules/mkdirp/.gitignore.rej
  275. +0 −2  node_modules/jade/node_modules/mkdirp/.npmignore
  276. +0 −21 node_modules/jade/node_modules/mkdirp/LICENSE
  277. +0 −54 node_modules/jade/node_modules/mkdirp/README.markdown
  278. +0 −6 node_modules/jade/node_modules/mkdirp/examples/pow.js
  279. +0 −6 node_modules/jade/node_modules/mkdirp/examples/pow.js.orig
  280. +0 −19 node_modules/jade/node_modules/mkdirp/examples/pow.js.rej
  281. +0 −79 node_modules/jade/node_modules/mkdirp/index.js
  282. +0 −37 node_modules/jade/node_modules/mkdirp/package.json
  283. +0 −38 node_modules/jade/node_modules/mkdirp/test/chmod.js
  284. +0 −37 node_modules/jade/node_modules/mkdirp/test/clobber.js
  285. +0 −28 node_modules/jade/node_modules/mkdirp/test/mkdirp.js
  286. +0 −32 node_modules/jade/node_modules/mkdirp/test/perm.js
  287. +0 −39 node_modules/jade/node_modules/mkdirp/test/perm_sync.js
  288. +0 −41 node_modules/jade/node_modules/mkdirp/test/race.js
  289. +0 −32 node_modules/jade/node_modules/mkdirp/test/rel.js
  290. +0 −27 node_modules/jade/node_modules/mkdirp/test/sync.js
  291. +0 −28 node_modules/jade/node_modules/mkdirp/test/umask.js
  292. +0 −27 node_modules/jade/node_modules/mkdirp/test/umask_sync.js
  293. +0 −46 node_modules/jade/package.json
  294. +0 −132 node_modules/jade/runtime.js
  295. +0 −1  node_modules/jade/runtime.min.js
  296. +0 −7 node_modules/jade/test.jade
  297. +0 −5 node_modules/jade/testing/head.jade
  298. +0 −48 node_modules/jade/testing/index.jade
  299. +0 −11 node_modules/jade/testing/index.js
  300. +0 −6 node_modules/jade/testing/layout.jade
Sorry, we could not display the entire diff because too many files (889) changed.
37 README.md
View
@@ -1,8 +1,13 @@
-#Build
+#FaceSpace
+This is the place for all my face based input device projects. Currently there are two major sides:
+- Node: this has all the WebRTC stuff for getting webcam in browser as well as doing face detection in browser. The server is node for various reasons (below). [Video of google streetview controls](https://vimeo.com/41747939)
+- Processing: using websockets to allow the face tracking to be done in Processing, then piped to the browser. [Video of three.js Minecraft controls](https://vimeo.com/41747940)
+
+## Building the node app
Requires node, npm and Chrome. Only tested on a Mac, should work on any computer with a webcam.
```
-git clone git@github.com:sczizzo/Faceit.git
+git clone git@github.com:paulkaplan/FaceSpace.git
cd Faceit
npm install
node app.js
@@ -10,40 +15,42 @@ node app.js
In Chrome, go to chrome://flags, enable MediaStream flag.
-##Structure:
+###Structure:
```localhost:3000
|- / -> Theremin
|- /map -> Google street view with face controls
|- /pong -> Multiplayer face pong
```
-#Troubleshooting / Warning
+###Troubleshooting / Warning
If you get some permissions errors, try starting Chrome from the terminal with this command:
-```
- /path/to/chrome/app --allow-file-access-from-file
+```/path/to/chrome/app --allow-file-access-from-file
```
On a Mac, that path is annoyingly long, for reference on my computer it looks like:
-```
- /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-file
+```/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-file
```
Also note: you might want to turn down your speakers, the theremin can catch you by surprise.
-#Status
+###Status
Face pong and theremin where created during the [hack@uchicago](http://hack.uchicago.edu/) hackathon, april 2012. Map was created shortly thereafter.
-###Pong
+####Pong
Uses [now.js](http://nowjs.com/) for multiplayer action, currently won't really work without two different people logged in. Even then it's pretty broken. Will get back to working on this soon with deterministic physics approach for auto tweening the ball from paddle to paddle, instead of the velocity based approach.
-###Theremin
+####Theremin
I want to make a blues scale jazz one. Or one where your up and down head motion is the drum beat and side to side is chord progression.
-###Map
+####Map
Lots to do here, mostly google street view isn't quite fast enough to keep up. Waiting for them to open up MapGL API. But working on a way to advance down the street in the direction you are facing, have a prototype which is alright I'll put up soon. It is like a real life racing game, pretty sweet actually.
###Future
-Looking into replacing pure javascript vision library with either Native Client (C/C++) or websocket-ing in the data from a server running client side.
+Looking into replacing pure javascript vision library with either Native Client (C/C++) or websocket-ing in the data from a server running client side (partially done, b elow)
-Working sample of websockets + Processing + minecraft in three.js will be up soon.
+#Building the Processing side
+This is arguably much easier:
+1. grab the [openCV Processing library](http://ubaa.net/shared/processing/opencv/)
+2. and the [websockets library](http://p5.twelvebytes.net/websocketP5-0.1.3/)
+3. run the sketch, it will start a server which hosts the websocket connection, index.html should be available at localhost:8080.
-#Wanna help?
+##Questions/comments
Feel free to contact [Paul](https://www.facebook.com/paulkaplan74 "Paul's Facebook") if any of this looks interesting to you or you want to get involved. There will be much more to come.
33 app.js
View
@@ -1,33 +0,0 @@
-var express = require('express');
-var routes = require('./routes');
-var app = module.exports = express.createServer();
-
-// Configuration
-app.configure(function(){
- app.set('views', __dirname + '/views');
- app.use(express.bodyParser());
- app.use(express.methodOverride());
- app.set('view engine', 'jade');
- app.use(app.router);
- app.use(express.static(__dirname + '/public'));
-});
-
-app.configure('development', function(){
- app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
-});
-
-app.configure('production', function(){
- app.use(express.errorHandler());
-});
-
-
-// Routes
-app.get('/', routes.index);
-app.get('/pong', routes.pong);
-app.get('/map', routes.map);
-
-app.listen(3000);
-var everyone = require("now").initialize(app);
-everyone.now.distributeMessage = function(message){
- everyone.now.receiveMessage(message);
-};
1  node_modules/.bin/express
View
1  node_modules/.bin/jade
View
7 node_modules/express/.npmignore
View
@@ -1,7 +0,0 @@
-.git*
-docs/
-examples/
-support/
-test/
-testing.js
-.DS_Store
805 node_modules/express/History.md
View
@@ -1,805 +0,0 @@
-
-2.5.8 / 2012-02-08
-==================
-
- * Update mkdirp dep. Closes #991
-
-2.5.7 / 2012-02-06
-==================
-
- * Fixed `app.all` duplicate DELETE requests [mscdex]
-
-2.5.6 / 2012-01-13
-==================
-
- * Updated hamljs dev dep. Closes #953
-
-2.5.5 / 2012-01-08
-==================
-
- * Fixed: set `filename` on cached templates [matthewleon]
-
-2.5.4 / 2012-01-02
-==================
-
- * Fixed `express(1)` eol on 0.4.x. Closes #947
-
-2.5.3 / 2011-12-30
-==================
-
- * Fixed `req.is()` when a charset is present
-
-2.5.2 / 2011-12-10
-==================
-
- * Fixed: express(1) LF -> CRLF for windows
-
-2.5.1 / 2011-11-17
-==================
-
- * Changed: updated connect to 1.8.x
- * Removed sass.js support from express(1)
-
-2.5.0 / 2011-10-24
-==================
-
- * Added ./routes dir for generated app by default
- * Added npm install reminder to express(1) app gen
- * Added 0.5.x support
- * Removed `make test-cov` since it wont work with node 0.5.x
- * Fixed express(1) public dir for windows. Closes #866
-
-2.4.7 / 2011-10-05
-==================
-
- * Added mkdirp to express(1). Closes #795
- * Added simple _json-config_ example
- * Added shorthand for the parsed request's pathname via `req.path`
- * Changed connect dep to 1.7.x to fix npm issue...
- * Fixed `res.redirect()` __HEAD__ support. [reported by xerox]
- * Fixed `req.flash()`, only escape args
- * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie]
-
-2.4.6 / 2011-08-22
-==================
-
- * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode]
-
-2.4.5 / 2011-08-19
-==================
-
- * Added support for routes to handle errors. Closes #809
- * Added `app.routes.all()`. Closes #803
- * Added "basepath" setting to work in conjunction with reverse proxies etc.
- * Refactored `Route` to use a single array of callbacks
- * Added support for multiple callbacks for `app.param()`. Closes #801
-Closes #805
- * Changed: removed .call(self) for route callbacks
- * Dependency: `qs >= 0.3.1`
- * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808
-
-2.4.4 / 2011-08-05
-==================
-
- * Fixed `res.header()` intention of a set, even when `undefined`
- * Fixed `*`, value no longer required
- * Fixed `res.send(204)` support. Closes #771
-
-2.4.3 / 2011-07-14
-==================
-
- * Added docs for `status` option special-case. Closes #739
- * Fixed `options.filename`, exposing the view path to template engines
-
-2.4.2. / 2011-07-06
-==================
-
- * Revert "removed jsonp stripping" for XSS
-
-2.4.1 / 2011-07-06
-==================
-
- * Added `res.json()` JSONP support. Closes #737
- * Added _extending-templates_ example. Closes #730
- * Added "strict routing" setting for trailing slashes
- * Added support for multiple envs in `app.configure()` calls. Closes #735
- * Changed: `res.send()` using `res.json()`
- * Changed: when cookie `path === null` don't default it
- * Changed; default cookie path to "home" setting. Closes #731
- * Removed _pids/logs_ creation from express(1)
-
-2.4.0 / 2011-06-28
-==================
-
- * Added chainable `res.status(code)`
- * Added `res.json()`, an explicit version of `res.send(obj)`
- * Added simple web-service example
-
-2.3.12 / 2011-06-22
-==================
-
- * \#express is now on freenode! come join!
- * Added `req.get(field, param)`
- * Added links to Japanese documentation, thanks @hideyukisaito!
- * Added; the `express(1)` generated app outputs the env
- * Added `content-negotiation` example
- * Dependency: connect >= 1.5.1 < 2.0.0
- * Fixed view layout bug. Closes #720
- * Fixed; ignore body on 304. Closes #701
-
-2.3.11 / 2011-06-04
-==================
-
- * Added `npm test`
- * Removed generation of dummy test file from `express(1)`
- * Fixed; `express(1)` adds express as a dep
- * Fixed; prune on `prepublish`
-
-2.3.10 / 2011-05-27
-==================
-
- * Added `req.route`, exposing the current route
- * Added _package.json_ generation support to `express(1)`
- * Fixed call to `app.param()` function for optional params. Closes #682
-
-2.3.9 / 2011-05-25
-==================
-
- * Fixed bug-ish with `../' in `res.partial()` calls
-
-2.3.8 / 2011-05-24
-==================
-
- * Fixed `app.options()`
-
-2.3.7 / 2011-05-23
-==================
-
- * Added route `Collection`, ex: `app.get('/user/:id').remove();`
- * Added support for `app.param(fn)` to define param logic
- * Removed `app.param()` support for callback with return value
- * Removed module.parent check from express(1) generated app. Closes #670
- * Refactored router. Closes #639
-
-2.3.6 / 2011-05-20
-==================
-
- * Changed; using devDependencies instead of git submodules
- * Fixed redis session example
- * Fixed markdown example
- * Fixed view caching, should not be enabled in development
-
-2.3.5 / 2011-05-20
-==================
-
- * Added export `.view` as alias for `.View`
-
-2.3.4 / 2011-05-08
-==================
-
- * Added `./examples/say`
- * Fixed `res.sendfile()` bug preventing the transfer of files with spaces
-
-2.3.3 / 2011-05-03
-==================
-
- * Added "case sensitive routes" option.
- * Changed; split methods supported per rfc [slaskis]
- * Fixed route-specific middleware when using the same callback function several times
-
-2.3.2 / 2011-04-27
-==================
-
- * Fixed view hints
-
-2.3.1 / 2011-04-26
-==================
-
- * Added `app.match()` as `app.match.all()`
- * Added `app.lookup()` as `app.lookup.all()`
- * Added `app.remove()` for `app.remove.all()`
- * Added `app.remove.VERB()`
- * Fixed template caching collision issue. Closes #644
- * Moved router over from connect and started refactor
-
-2.3.0 / 2011-04-25
-==================
-
- * Added options support to `res.clearCookie()`
- * Added `res.helpers()` as alias of `res.locals()`
- * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0`
- * Changed; auto set Content-Type in res.attachement [Aaron Heckmann]
- * Renamed "cache views" to "view cache". Closes #628
- * Fixed caching of views when using several apps. Closes #637
- * Fixed gotcha invoking `app.param()` callbacks once per route middleware.
-Closes #638
- * Fixed partial lookup precedence. Closes #631
-Shaw]
-
-2.2.2 / 2011-04-12
-==================
-
- * Added second callback support for `res.download()` connection errors
- * Fixed `filename` option passing to template engine
-
-2.2.1 / 2011-04-04
-==================
-
- * Added `layout(path)` helper to change the layout within a view. Closes #610
- * Fixed `partial()` collection object support.
- Previously only anything with `.length` would work.
- When `.length` is present one must still be aware of holes,
- however now `{ collection: {foo: 'bar'}}` is valid, exposes
- `keyInCollection` and `keysInCollection`.
-
- * Performance improved with better view caching
- * Removed `request` and `response` locals
- * Changed; errorHandler page title is now `Express` instead of `Connect`
-
-2.2.0 / 2011-03-30
-==================
-
- * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606
- * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606
- * Added `app.VERB(path)` as alias of `app.lookup.VERB()`.
- * Dependency `connect >= 1.2.0`
-
-2.1.1 / 2011-03-29
-==================
-
- * Added; expose `err.view` object when failing to locate a view
- * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann]
- * Fixed; `res.send(undefined)` responds with 204 [aheckmann]
-
-2.1.0 / 2011-03-24
-==================
-
- * Added `<root>/_?<name>` partial lookup support. Closes #447
- * Added `request`, `response`, and `app` local variables
- * Added `settings` local variable, containing the app's settings
- * Added `req.flash()` exception if `req.session` is not available
- * Added `res.send(bool)` support (json response)
- * Fixed stylus example for latest version
- * Fixed; wrap try/catch around `res.render()`
-
-2.0.0 / 2011-03-17
-==================
-
- * Fixed up index view path alternative.
- * Changed; `res.locals()` without object returns the locals
-
-2.0.0rc3 / 2011-03-17
-==================
-
- * Added `res.locals(obj)` to compliment `res.local(key, val)`
- * Added `res.partial()` callback support
- * Fixed recursive error reporting issue in `res.render()`
-
-2.0.0rc2 / 2011-03-17
-==================
-
- * Changed; `partial()` "locals" are now optional
- * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01]
- * Fixed .filename view engine option [reported by drudge]
- * Fixed blog example
- * Fixed `{req,res}.app` reference when mounting [Ben Weaver]
-
-2.0.0rc / 2011-03-14
-==================
-
- * Fixed; expose `HTTPSServer` constructor
- * Fixed express(1) default test charset. Closes #579 [reported by secoif]
- * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP]
-
-2.0.0beta3 / 2011-03-09
-==================
-
- * Added support for `res.contentType()` literal
- The original `res.contentType('.json')`,
- `res.contentType('application/json')`, and `res.contentType('json')`
- will work now.
- * Added `res.render()` status option support back
- * Added charset option for `res.render()`
- * Added `.charset` support (via connect 1.0.4)
- * Added view resolution hints when in development and a lookup fails
- * Added layout lookup support relative to the page view.
- For example while rendering `./views/user/index.jade` if you create
- `./views/user/layout.jade` it will be used in favour of the root layout.
- * Fixed `res.redirect()`. RFC states absolute url [reported by unlink]
- * Fixed; default `res.send()` string charset to utf8
- * Removed `Partial` constructor (not currently used)
-
-2.0.0beta2 / 2011-03-07
-==================
-
- * Added res.render() `.locals` support back to aid in migration process
- * Fixed flash example
-
-2.0.0beta / 2011-03-03
-==================
-
- * Added HTTPS support
- * Added `res.cookie()` maxAge support
- * Added `req.header()` _Referrer_ / _Referer_ special-case, either works
- * Added mount support for `res.redirect()`, now respects the mount-point
- * Added `union()` util, taking place of `merge(clone())` combo
- * Added stylus support to express(1) generated app
- * Added secret to session middleware used in examples and generated app
- * Added `res.local(name, val)` for progressive view locals
- * Added default param support to `req.param(name, default)`
- * Added `app.disabled()` and `app.enabled()`
- * Added `app.register()` support for omitting leading ".", either works
- * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539
- * Added `app.param()` to map route params to async/sync logic
- * Added; aliased `app.helpers()` as `app.locals()`. Closes #481
- * Added extname with no leading "." support to `res.contentType()`
- * Added `cache views` setting, defaulting to enabled in "production" env
- * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_.
- * Added `req.accepts()` support for extensions
- * Changed; `res.download()` and `res.sendfile()` now utilize Connect's
- static file server `connect.static.send()`.
- * Changed; replaced `connect.utils.mime()` with npm _mime_ module
- * Changed; allow `req.query` to be pre-defined (via middleware or other parent
- * Changed view partial resolution, now relative to parent view
- * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`.
- * Fixed `req.param()` bug returning Array.prototype methods. Closes #552
- * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()`
- * Fixed; using _qs_ module instead of _querystring_
- * Fixed; strip unsafe chars from jsonp callbacks
- * Removed "stream threshold" setting
-
-1.0.8 / 2011-03-01
-==================
-
- * Allow `req.query` to be pre-defined (via middleware or other parent app)
- * "connect": ">= 0.5.0 < 1.0.0". Closes #547
- * Removed the long deprecated __EXPRESS_ENV__ support
-
-1.0.7 / 2011-02-07
-==================
-
- * Fixed `render()` setting inheritance.
- Mounted apps would not inherit "view engine"
-
-1.0.6 / 2011-02-07
-==================
-
- * Fixed `view engine` setting bug when period is in dirname
-
-1.0.5 / 2011-02-05
-==================
-
- * Added secret to generated app `session()` call
-
-1.0.4 / 2011-02-05
-==================
-
- * Added `qs` dependency to _package.json_
- * Fixed namespaced `require()`s for latest connect support
-
-1.0.3 / 2011-01-13
-==================
-
- * Remove unsafe characters from JSONP callback names [Ryan Grove]
-
-1.0.2 / 2011-01-10
-==================
-
- * Removed nested require, using `connect.router`
-
-1.0.1 / 2010-12-29
-==================
-
- * Fixed for middleware stacked via `createServer()`
- previously the `foo` middleware passed to `createServer(foo)`
- would not have access to Express methods such as `res.send()`
- or props like `req.query` etc.
-
-1.0.0 / 2010-11-16
-==================
-
- * Added; deduce partial object names from the last segment.
- For example by default `partial('forum/post', postObject)` will
- give you the _post_ object, providing a meaningful default.
- * Added http status code string representation to `res.redirect()` body
- * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__.
- * Added `req.is()` to aid in content negotiation
- * Added partial local inheritance [suggested by masylum]. Closes #102
- providing access to parent template locals.
- * Added _-s, --session[s]_ flag to express(1) to add session related middleware
- * Added _--template_ flag to express(1) to specify the
- template engine to use.
- * Added _--css_ flag to express(1) to specify the
- stylesheet engine to use (or just plain css by default).
- * Added `app.all()` support [thanks aheckmann]
- * Added partial direct object support.
- You may now `partial('user', user)` providing the "user" local,
- vs previously `partial('user', { object: user })`.
- * Added _route-separation_ example since many people question ways
- to do this with CommonJS modules. Also view the _blog_ example for
- an alternative.
- * Performance; caching view path derived partial object names
- * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454
- * Fixed jsonp support; _text/javascript_ as per mailinglist discussion
-
-1.0.0rc4 / 2010-10-14
-==================
-
- * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0
- * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware))
- * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass]
- * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass]
- * Added `partial()` support for array-like collections. Closes #434
- * Added support for swappable querystring parsers
- * Added session usage docs. Closes #443
- * Added dynamic helper caching. Closes #439 [suggested by maritz]
- * Added authentication example
- * Added basic Range support to `res.sendfile()` (and `res.download()` etc)
- * Changed; `express(1)` generated app using 2 spaces instead of 4
- * Default env to "development" again [aheckmann]
- * Removed _context_ option is no more, use "scope"
- * Fixed; exposing _./support_ libs to examples so they can run without installs
- * Fixed mvc example
-
-1.0.0rc3 / 2010-09-20
-==================
-
- * Added confirmation for `express(1)` app generation. Closes #391
- * Added extending of flash formatters via `app.flashFormatters`
- * Added flash formatter support. Closes #411
- * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold"
- * Added _stream threshold_ setting for `res.sendfile()`
- * Added `res.send()` __HEAD__ support
- * Added `res.clearCookie()`
- * Added `res.cookie()`
- * Added `res.render()` headers option
- * Added `res.redirect()` response bodies
- * Added `res.render()` status option support. Closes #425 [thanks aheckmann]
- * Fixed `res.sendfile()` responding with 403 on malicious path
- * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_
- * Fixed; mounted apps settings now inherit from parent app [aheckmann]
- * Fixed; stripping Content-Length / Content-Type when 204
- * Fixed `res.send()` 204. Closes #419
- * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402
- * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo]
-
-
-1.0.0rc2 / 2010-08-17
-==================
-
- * Added `app.register()` for template engine mapping. Closes #390
- * Added `res.render()` callback support as second argument (no options)
- * Added callback support to `res.download()`
- * Added callback support for `res.sendfile()`
- * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()`
- * Added "partials" setting to docs
- * Added default expresso tests to `express(1)` generated app. Closes #384
- * Fixed `res.sendfile()` error handling, defer via `next()`
- * Fixed `res.render()` callback when a layout is used [thanks guillermo]
- * Fixed; `make install` creating ~/.node_libraries when not present
- * Fixed issue preventing error handlers from being defined anywhere. Closes #387
-
-1.0.0rc / 2010-07-28
-==================
-
- * Added mounted hook. Closes #369
- * Added connect dependency to _package.json_
-
- * Removed "reload views" setting and support code
- development env never caches, production always caches.
-
- * Removed _param_ in route callbacks, signature is now
- simply (req, res, next), previously (req, res, params, next).
- Use _req.params_ for path captures, _req.query_ for GET params.
-
- * Fixed "home" setting
- * Fixed middleware/router precedence issue. Closes #366
- * Fixed; _configure()_ callbacks called immediately. Closes #368
-
-1.0.0beta2 / 2010-07-23
-==================
-
- * Added more examples
- * Added; exporting `Server` constructor
- * Added `Server#helpers()` for view locals
- * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349
- * Added support for absolute view paths
- * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363
- * Added Guillermo Rauch to the contributor list
- * Added support for "as" for non-collection partials. Closes #341
- * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf]
- * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo]
- * Fixed instanceof `Array` checks, now `Array.isArray()`
- * Fixed express(1) expansion of public dirs. Closes #348
- * Fixed middleware precedence. Closes #345
- * Fixed view watcher, now async [thanks aheckmann]
-
-1.0.0beta / 2010-07-15
-==================
-
- * Re-write
- - much faster
- - much lighter
- - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs
-
-0.14.0 / 2010-06-15
-==================
-
- * Utilize relative requires
- * Added Static bufferSize option [aheckmann]
- * Fixed caching of view and partial subdirectories [aheckmann]
- * Fixed mime.type() comments now that ".ext" is not supported
- * Updated haml submodule
- * Updated class submodule
- * Removed bin/express
-
-0.13.0 / 2010-06-01
-==================
-
- * Added node v0.1.97 compatibility
- * Added support for deleting cookies via Request#cookie('key', null)
- * Updated haml submodule
- * Fixed not-found page, now using using charset utf-8
- * Fixed show-exceptions page, now using using charset utf-8
- * Fixed view support due to fs.readFile Buffers
- * Changed; mime.type() no longer accepts ".type" due to node extname() changes
-
-0.12.0 / 2010-05-22
-==================
-
- * Added node v0.1.96 compatibility
- * Added view `helpers` export which act as additional local variables
- * Updated haml submodule
- * Changed ETag; removed inode, modified time only
- * Fixed LF to CRLF for setting multiple cookies
- * Fixed cookie complation; values are now urlencoded
- * Fixed cookies parsing; accepts quoted values and url escaped cookies
-
-0.11.0 / 2010-05-06
-==================
-
- * Added support for layouts using different engines
- - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' })
- - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml'
- - this.render('page.html.haml', { layout: false }) // no layout
- * Updated ext submodule
- * Updated haml submodule
- * Fixed EJS partial support by passing along the context. Issue #307
-
-0.10.1 / 2010-05-03
-==================
-
- * Fixed binary uploads.
-
-0.10.0 / 2010-04-30
-==================
-
- * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s
- encoding is set to 'utf8' or 'utf-8'.
- * Added "encoding" option to Request#render(). Closes #299
- * Added "dump exceptions" setting, which is enabled by default.
- * Added simple ejs template engine support
- * Added error reponse support for text/plain, application/json. Closes #297
- * Added callback function param to Request#error()
- * Added Request#sendHead()
- * Added Request#stream()
- * Added support for Request#respond(304, null) for empty response bodies
- * Added ETag support to Request#sendfile()
- * Added options to Request#sendfile(), passed to fs.createReadStream()
- * Added filename arg to Request#download()
- * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request
- * Performance enhanced by preventing several calls to toLowerCase() in Router#match()
- * Changed; Request#sendfile() now streams
- * Changed; Renamed Request#halt() to Request#respond(). Closes #289
- * Changed; Using sys.inspect() instead of JSON.encode() for error output
- * Changed; run() returns the http.Server instance. Closes #298
- * Changed; Defaulting Server#host to null (INADDR_ANY)
- * Changed; Logger "common" format scale of 0.4f
- * Removed Logger "request" format
- * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found
- * Fixed several issues with http client
- * Fixed Logger Content-Length output
- * Fixed bug preventing Opera from retaining the generated session id. Closes #292
-
-0.9.0 / 2010-04-14
-==================
-
- * Added DSL level error() route support
- * Added DSL level notFound() route support
- * Added Request#error()
- * Added Request#notFound()
- * Added Request#render() callback function. Closes #258
- * Added "max upload size" setting
- * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254
- * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js
- * Added callback function support to Request#halt() as 3rd/4th arg
- * Added preprocessing of route param wildcards using param(). Closes #251
- * Added view partial support (with collections etc)
- * Fixed bug preventing falsey params (such as ?page=0). Closes #286
- * Fixed setting of multiple cookies. Closes #199
- * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml)
- * Changed; session cookie is now httpOnly
- * Changed; Request is no longer global
- * Changed; Event is no longer global
- * Changed; "sys" module is no longer global
- * Changed; moved Request#download to Static plugin where it belongs
- * Changed; Request instance created before body parsing. Closes #262
- * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253
- * Changed; Pre-caching view partials in memory when "cache view partials" is enabled
- * Updated support to node --version 0.1.90
- * Updated dependencies
- * Removed set("session cookie") in favour of use(Session, { cookie: { ... }})
- * Removed utils.mixin(); use Object#mergeDeep()
-
-0.8.0 / 2010-03-19
-==================
-
- * Added coffeescript example app. Closes #242
- * Changed; cache api now async friendly. Closes #240
- * Removed deprecated 'express/static' support. Use 'express/plugins/static'
-
-0.7.6 / 2010-03-19
-==================
-
- * Added Request#isXHR. Closes #229
- * Added `make install` (for the executable)
- * Added `express` executable for setting up simple app templates
- * Added "GET /public/*" to Static plugin, defaulting to <root>/public
- * Added Static plugin
- * Fixed; Request#render() only calls cache.get() once
- * Fixed; Namespacing View caches with "view:"
- * Fixed; Namespacing Static caches with "static:"
- * Fixed; Both example apps now use the Static plugin
- * Fixed set("views"). Closes #239
- * Fixed missing space for combined log format
- * Deprecated Request#sendfile() and 'express/static'
- * Removed Server#running
-
-0.7.5 / 2010-03-16
-==================
-
- * Added Request#flash() support without args, now returns all flashes
- * Updated ext submodule
-
-0.7.4 / 2010-03-16
-==================
-
- * Fixed session reaper
- * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft)
-
-0.7.3 / 2010-03-16
-==================
-
- * Added package.json
- * Fixed requiring of haml / sass due to kiwi removal
-
-0.7.2 / 2010-03-16
-==================
-
- * Fixed GIT submodules (HAH!)
-
-0.7.1 / 2010-03-16
-==================
-
- * Changed; Express now using submodules again until a PM is adopted
- * Changed; chat example using millisecond conversions from ext
-
-0.7.0 / 2010-03-15
-==================
-
- * Added Request#pass() support (finds the next matching route, or the given path)
- * Added Logger plugin (default "common" format replaces CommonLogger)
- * Removed Profiler plugin
- * Removed CommonLogger plugin
-
-0.6.0 / 2010-03-11
-==================
-
- * Added seed.yml for kiwi package management support
- * Added HTTP client query string support when method is GET. Closes #205
-
- * Added support for arbitrary view engines.
- For example "foo.engine.html" will now require('engine'),
- the exports from this module are cached after the first require().
-
- * Added async plugin support
-
- * Removed usage of RESTful route funcs as http client
- get() etc, use http.get() and friends
-
- * Removed custom exceptions
-
-0.5.0 / 2010-03-10
-==================
-
- * Added ext dependency (library of js extensions)
- * Removed extname() / basename() utils. Use path module
- * Removed toArray() util. Use arguments.values
- * Removed escapeRegexp() util. Use RegExp.escape()
- * Removed process.mixin() dependency. Use utils.mixin()
- * Removed Collection
- * Removed ElementCollection
- * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;)
-
-0.4.0 / 2010-02-11
-==================
-
- * Added flash() example to sample upload app
- * Added high level restful http client module (express/http)
- * Changed; RESTful route functions double as HTTP clients. Closes #69
- * Changed; throwing error when routes are added at runtime
- * Changed; defaulting render() context to the current Request. Closes #197
- * Updated haml submodule
-
-0.3.0 / 2010-02-11
-==================
-
- * Updated haml / sass submodules. Closes #200
- * Added flash message support. Closes #64
- * Added accepts() now allows multiple args. fixes #117
- * Added support for plugins to halt. Closes #189
- * Added alternate layout support. Closes #119
- * Removed Route#run(). Closes #188
- * Fixed broken specs due to use(Cookie) missing
-
-0.2.1 / 2010-02-05
-==================
-
- * Added "plot" format option for Profiler (for gnuplot processing)
- * Added request number to Profiler plugin
- * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8
- * Fixed issue with routes not firing when not files are present. Closes #184
- * Fixed process.Promise -> events.Promise
-
-0.2.0 / 2010-02-03
-==================
-
- * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180
- * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174
- * Added expiration support to cache api with reaper. Closes #133
- * Added cache Store.Memory#reap()
- * Added Cache; cache api now uses first class Cache instances
- * Added abstract session Store. Closes #172
- * Changed; cache Memory.Store#get() utilizing Collection
- * Renamed MemoryStore -> Store.Memory
- * Fixed use() of the same plugin several time will always use latest options. Closes #176
-
-0.1.0 / 2010-02-03
-==================
-
- * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context
- * Updated node support to 0.1.27 Closes #169
- * Updated dirname(__filename) -> __dirname
- * Updated libxmljs support to v0.2.0
- * Added session support with memory store / reaping
- * Added quick uid() helper
- * Added multi-part upload support
- * Added Sass.js support / submodule
- * Added production env caching view contents and static files
- * Added static file caching. Closes #136
- * Added cache plugin with memory stores
- * Added support to StaticFile so that it works with non-textual files.
- * Removed dirname() helper
- * Removed several globals (now their modules must be required)
-
-0.0.2 / 2010-01-10
-==================
-
- * Added view benchmarks; currently haml vs ejs
- * Added Request#attachment() specs. Closes #116
- * Added use of node's parseQuery() util. Closes #123
- * Added `make init` for submodules
- * Updated Haml
- * Updated sample chat app to show messages on load
- * Updated libxmljs parseString -> parseHtmlString
- * Fixed `make init` to work with older versions of git
- * Fixed specs can now run independant specs for those who cant build deps. Closes #127
- * Fixed issues introduced by the node url module changes. Closes 126.
- * Fixed two assertions failing due to Collection#keys() returning strings
- * Fixed faulty Collection#toArray() spec due to keys() returning strings
- * Fixed `make test` now builds libxmljs.node before testing
-
-0.0.1 / 2010-01-03
-==================
-
- * Initial release
22 node_modules/express/LICENSE
View
@@ -1,22 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2009-2011 TJ Holowaychuk <tj@vision-media.ca>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 node_modules/express/Makefile
View
@@ -1,29 +0,0 @@
-
-DOCS = $(shell find docs/*.md)
-HTMLDOCS = $(DOCS:.md=.html)
-TESTS = $(shell find test/*.test.js)
-
-test:
- @NODE_ENV=test ./node_modules/.bin/expresso $(TESTS)
-
-docs: $(HTMLDOCS)
- @ echo "... generating TOC"
- @./support/toc.js docs/guide.html
-
-%.html: %.md
- @echo "... $< -> $@"
- @markdown $< \
- | cat docs/layout/head.html - docs/layout/foot.html \
- > $@
-
-site:
- rm -fr /tmp/docs \
- && cp -fr docs /tmp/docs \
- && git checkout gh-pages \
- && cp -fr /tmp/docs/* . \
- && echo "done"
-
-docclean:
- rm -f docs/*.{1,html}
-
-.PHONY: site test docs docclean
145 node_modules/express/Readme.md
View
@@ -1,145 +0,0 @@
-
-# Express
-
- Insanely fast (and small) server-side JavaScript web development framework
- built on [node](http://nodejs.org) and [Connect](http://github.com/senchalabs/connect).
-
- var app = express.createServer();
-
- app.get('/', function(req, res){
- res.send('Hello World');
- });
-
- app.listen(3000);
-
-## Installation
-
- $ npm install express
-
-or to access the `express(1)` executable install globally:
-
- $ npm install -g express
-
-## Quick Start
-
- The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below:
-
- Create the app:
-
- $ npm install -g express
- $ express /tmp/foo && cd /tmp/foo
-
- Install dependencies:
-
- $ npm install -d
-
- Start the server:
-
- $ node app.js
-
-## Features
-
- * Robust routing
- * Redirection helpers
- * Dynamic view helpers
- * Content negotiation
- * Focus on high performance
- * View rendering and partials support
- * Environment based configuration
- * Session based flash notifications
- * Built on [Connect](http://github.com/senchalabs/connect)
- * High test coverage
- * Executable for generating applications quickly
- * Application level view options
-
-Via Connect:
-
- * Session support
- * Cache API
- * Mime helpers
- * ETag support
- * Persistent flash notifications
- * Cookie support
- * JSON-RPC
- * Logging
- * and _much_ more!
-
-## Contributors
-
-The following are the major contributors of Express (in no specific order).
-
- * TJ Holowaychuk ([visionmedia](http://github.com/visionmedia))
- * Ciaran Jessup ([ciaranj](http://github.com/ciaranj))
- * Aaron Heckmann ([aheckmann](http://github.com/aheckmann))
- * Guillermo Rauch ([guille](http://github.com/guille))
-
-## More Information
-
- * #express on freenode
- * [express-expose](http://github.com/visionmedia/express-expose) expose objects, functions, modules and more to client-side js with ease
- * [express-configure](http://github.com/visionmedia/express-configuration) async configuration support
- * [express-messages](http://github.com/visionmedia/express-messages) flash notification rendering helper
- * [express-namespace](http://github.com/visionmedia/express-namespace) namespaced route support
- * [express-params](https://github.com/visionmedia/express-params) param pre-condition functions
- * [express-mongoose](https://github.com/LearnBoost/express-mongoose) plugin for easy rendering of Mongoose async Query results
- * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates
- * [Google Group](http://groups.google.com/group/express-js) for discussion
- * Visit the [Wiki](http://github.com/visionmedia/express/wiki)
- * [日本語ドキュメンテーション](http://hideyukisaito.com/doc/expressjs/) by [hideyukisaito](https://github.com/hideyukisaito)
- * Screencast - [Introduction](http://bit.ly/eRYu0O)
- * Screencast - [View Partials](http://bit.ly/dU13Fx)
- * Screencast - [Route Specific Middleware](http://bit.ly/hX4IaH)
- * Screencast - [Route Path Placeholder Preconditions](http://bit.ly/eNqmVs)
-
-## Node Compatibility
-
-Express 1.x is compatible with node 0.2.x and connect < 1.0.
-
-Express 2.x is compatible with node 0.4.x or 0.6.x, and connect 1.x
-
-Express 3.x (master) will be compatible with node 0.6.x and connect 2.x
-
-## Viewing Examples
-
-First install the dev dependencies to install all the example / test suite deps:
-
- $ npm install
-
-then run whichever tests you want:
-
- $ node examples/jade/app.js
-
-## Running Tests
-
-To run the test suite first invoke the following command within the repo, installing the development dependencies:
-
- $ npm install
-
-then run the tests:
-
- $ make test
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2009-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
416 node_modules/express/bin/express
View
@@ -1,416 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Module dependencies.
- */
-
-var fs = require('fs')
- , os = require('os')
- , exec = require('child_process').exec
- , mkdirp = require('mkdirp');
-
-/**
- * Framework version.
- */
-
-var version = '2.5.8';
-
-/**
- * Add session support.
- */
-
-var sessions = false;
-
-/**
- * CSS engine to utilize.
- */
-
-var cssEngine;
-
-/**
- * End-of-line code.
- */
-
-var eol = os.platform
- ? ('win32' == os.platform() ? '\r\n' : '\n')
- : '\n';
-
-/**
- * Template engine to utilize.
- */
-
-var templateEngine = 'jade';
-
-/**
- * Usage documentation.
- */
-
-var usage = ''
- + '\n'
- + ' Usage: express [options] [path]\n'
- + '\n'
- + ' Options:\n'
- + ' -s, --sessions add session support\n'
- + ' -t, --template <engine> add template <engine> support (jade|ejs). default=jade\n'
- + ' -c, --css <engine> add stylesheet <engine> support (stylus). default=plain css\n'
- + ' -v, --version output framework version\n'
- + ' -h, --help output help information\n'
- ;
-
-/**
- * Routes index template.
- */
-
-var index = [
- ''
- , '/*'
- , ' * GET home page.'
- , ' */'
- , ''
- , 'exports.index = function(req, res){'
- , ' res.render(\'index\', { title: \'Express\' })'
- , '};'
-].join(eol);
-
-/**
- * Jade layout template.
- */
-
-var jadeLayout = [
- '!!!'
- , 'html'
- , ' head'
- , ' title= title'
- , ' link(rel=\'stylesheet\', href=\'/stylesheets/style.css\')'
- , ' body!= body'
-].join(eol);
-
-/**
- * Jade index template.
- */
-
-var jadeIndex = [
- 'h1= title'
- , 'p Welcome to #{title}'
-].join(eol);
-
-/**
- * EJS layout template.
- */
-
-var ejsLayout = [
- '<!DOCTYPE html>'
- , '<html>'
- , ' <head>'
- , ' <title><%= title %></title>'
- , ' <link rel=\'stylesheet\' href=\'/stylesheets/style.css\' />'
- , ' </head>'
- , ' <body>'
- , ' <%- body %>'
- , ' </body>'
- , '</html>'
-].join(eol);
-
-/**
- * EJS index template.
- */
-
-var ejsIndex = [
- '<h1><%= title %></h1>'
- , '<p>Welcome to <%= title %></p>'
- ].join(eol);
-
-/**
- * Default css template.
- */
-
-var css = [
- 'body {'
- , ' padding: 50px;'
- , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;'
- , '}'
- , ''
- , 'a {'
- , ' color: #00B7FF;'
- , '}'
-].join(eol);
-
-/**
- * Default stylus template.
- */
-
-var stylus = [
- 'body'
- , ' padding: 50px'
- , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif'
- , 'a'
- , ' color: #00B7FF'
-].join(eol);
-
-/**
- * App template.
- */
-
-var app = [
- ''
- , '/**'
- , ' * Module dependencies.'
- , ' */'
- , ''
- , 'var express = require(\'express\')'
- , ' , routes = require(\'./routes\');'
- , ''
- , 'var app = module.exports = express.createServer();'
- , ''
- , '// Configuration'
- , ''
- , 'app.configure(function(){'
- , ' app.set(\'views\', __dirname + \'/views\');'
- , ' app.set(\'view engine\', \':TEMPLATE\');'
- , ' app.use(express.bodyParser());'
- , ' app.use(express.methodOverride());{sess}{css}'
- , ' app.use(app.router);'
- , ' app.use(express.static(__dirname + \'/public\'));'
- , '});'
- , ''
- , 'app.configure(\'development\', function(){'
- , ' app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));'
- , '});'
- , ''
- , 'app.configure(\'production\', function(){'
- , ' app.use(express.errorHandler());'
- , '});'
- , ''
- , '// Routes'
- , ''
- , 'app.get(\'/\', routes.index);'
- , ''
- , 'app.listen(3000);'
- , 'console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);'
- , ''
-].join(eol);
-
-// Parse arguments
-
-var args = process.argv.slice(2)
- , path = '.';
-
-while (args.length) {
- var arg = args.shift();
- switch (arg) {
- case '-h':
- case '--help':
- abort(usage);
- break;
- case '-v':
- case '--version':
- abort(version);
- break;
- case '-s':
- case '--session':
- case '--sessions':
- sessions = true;
- break;
- case '-c':
- case '--css':
- args.length
- ? (cssEngine = args.shift())
- : abort('--css requires an argument');
- break;
- case '-t':
- case '--template':
- args.length
- ? (templateEngine = args.shift())
- : abort('--template requires an argument');
- break;
- default:
- path = arg;
- }
-}
-
-// Generate application
-
-(function createApplication(path) {
- emptyDirectory(path, function(empty){
- if (empty) {
- createApplicationAt(path);
- } else {
- confirm('destination is not empty, continue? ', function(ok){
- if (ok) {
- process.stdin.destroy();
- createApplicationAt(path);
- } else {
- abort('aborting');
- }
- });
- }
- });
-})(path);
-
-/**
- * Create application at the given directory `path`.
- *
- * @param {String} path
- */
-
-function createApplicationAt(path) {
- console.log();
- process.on('exit', function(){
- console.log();
- console.log(' dont forget to install dependencies:');
- console.log(' $ cd %s && npm install', path);
- console.log();
- });
-
- mkdir(path, function(){
- mkdir(path + '/public');
- mkdir(path + '/public/javascripts');
- mkdir(path + '/public/images');
- mkdir(path + '/public/stylesheets', function(){
- switch (cssEngine) {
- case 'stylus':
- write(path + '/public/stylesheets/style.styl', stylus);
- break;
- default:
- write(path + '/public/stylesheets/style.css', css);
- }
- });
-
- mkdir(path + '/routes', function(){
- write(path + '/routes/index.js', index);
- });
-
- mkdir(path + '/views', function(){
- switch (templateEngine) {
- case 'ejs':
- write(path + '/views/layout.ejs', ejsLayout);
- write(path + '/views/index.ejs', ejsIndex);
- break;
- case 'jade':
- write(path + '/views/layout.jade', jadeLayout);
- write(path + '/views/index.jade', jadeIndex);
- break;
- }
- });
-
- // CSS Engine support
- switch (cssEngine) {
- case 'stylus':
- app = app.replace('{css}', eol + ' app.use(require(\'stylus\').middleware({ src: __dirname + \'/public\' }));');
- break;
- default:
- app = app.replace('{css}', '');
- }
-
- // Session support
- app = app.replace('{sess}', sessions
- ? eol + ' app.use(express.cookieParser());' + eol + ' app.use(express.session({ secret: \'your secret here\' }));'
- : '');
-
- // Template support
- app = app.replace(':TEMPLATE', templateEngine);
-
- // package.json
- var json = '{' + eol;
- json += ' "name": "application-name"' + eol;
- json += ' , "version": "0.0.1"' + eol;
- json += ' , "private": true' + eol;
- json += ' , "dependencies": {' + eol;
- json += ' "express": "' + version + '"' + eol;
- if (cssEngine) json += ' , "' + cssEngine + '": ">= 0.0.1"' + eol;
- if (templateEngine) json += ' , "' + templateEngine + '": ">= 0.0.1"' + eol;
- json += ' }' + eol;
- json += '}';
-
-
- write(path + '/package.json', json);
- write(path + '/app.js', app);
- });
-}
-
-/**
- * Check if the given directory `path` is empty.
- *
- * @param {String} path
- * @param {Function} fn
- */
-
-function emptyDirectory(path, fn) {
- fs.readdir(path, function(err, files){
- if (err && 'ENOENT' != err.code) throw err;
- fn(!files || !files.length);
- });
-}
-
-/**
- * echo str > path.
- *
- * @param {String} path
- * @param {String} str
- */
-
-function write(path, str) {
- fs.writeFile(path, str);
- console.log(' \x1b[36mcreate\x1b[0m : ' + path);
-}
-
-/**
- * Prompt confirmation with the given `msg`.
- *
- * @param {String} msg
- * @param {Function} fn
- */
-
-function confirm(msg, fn) {
- prompt(msg, function(val){
- fn(/^ *y(es)?/i.test(val));
- });
-}
-
-/**
- * Prompt input with the given `msg` and callback `fn`.
- *
- * @param {String} msg
- * @param {Function} fn
- */
-
-function prompt(msg, fn) {
- // prompt
- if (' ' == msg[msg.length - 1]) {
- process.stdout.write(msg);
- } else {
- console.log(msg);
- }
-
- // stdin
- process.stdin.setEncoding('ascii');
- process.stdin.once('data', function(data){
- fn(data);
- }).resume();
-}
-
-/**
- * Mkdir -p.
- *
- * @param {String} path
- * @param {Function} fn
- */
-
-function mkdir(path, fn) {
- mkdirp(path, 0755, function(err){
- if (err) throw err;
- console.log(' \033[36mcreate\033[0m : ' + path);
- fn && fn();
- });
-}
-
-/**
- * Exit with the given `str`.
- *
- * @param {String} str
- */
-
-function abort(str) {
- console.error(str);
- process.exit(1);
-}
2  node_modules/express/index.js
View
@@ -1,2 +0,0 @@
-
-module.exports = require('./lib/express');
79 node_modules/express/lib/express.js
View
@@ -1,79 +0,0 @@
-
-/*!
- * Express
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var connect = require('connect')
- , HTTPSServer = require('./https')
- , HTTPServer = require('./http')
- , Route = require('./router/route')
-
-/**
- * Re-export connect auto-loaders.
- *
- * This prevents the need to `require('connect')` in order
- * to access core middleware, so for example `express.logger()` instead
- * of `require('connect').logger()`.
- */
-
-var exports = module.exports = connect.middleware;
-
-/**
- * Framework version.
- */
-
-exports.version = '2.5.8';
-
-/**
- * Shortcut for `new Server(...)`.
- *
- * @param {Function} ...
- * @return {Server}
- * @api public
- */
-
-exports.createServer = function(options){
- if ('object' == typeof options) {
- return new HTTPSServer(options, Array.prototype.slice.call(arguments, 1));
- } else {
- return new HTTPServer(Array.prototype.slice.call(arguments));
- }
-};
-
-/**
- * Expose constructors.
- */
-
-exports.HTTPServer = HTTPServer;
-exports.HTTPSServer = HTTPSServer;
-exports.Route = Route;
-
-/**
- * View extensions.
- */
-
-exports.View =
-exports.view = require('./view');
-
-/**
- * Response extensions.
- */
-
-require('./response');
-
-/**
- * Request extensions.
- */
-
-require('./request');
-
-// Error handler title
-
-exports.errorHandler.title = 'Express';
-
582 node_modules/express/lib/http.js
View
@@ -1,582 +0,0 @@
-/*!
- * Express - HTTPServer
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var qs = require('qs')
- , connect = require('connect')
- , router = require('./router')
- , Router = require('./router')
- , view = require('./view')
- , toArray = require('./utils').toArray
- , methods = router.methods.concat('del', 'all')
- , url = require('url')
- , utils = connect.utils;
-
-/**
- * Expose `HTTPServer`.
- */
-
-exports = module.exports = HTTPServer;
-
-/**
- * Server proto.
- */
-
-var app = HTTPServer.prototype;
-
-/**
- * Initialize a new `HTTPServer` with optional `middleware`.
- *
- * @param {Array} middleware
- * @api public
- */
-
-function HTTPServer(middleware){
- connect.HTTPServer.call(this, []);
- this.init(middleware);
-};
-
-/**
- * Inherit from `connect.HTTPServer`.
- */
-
-app.__proto__ = connect.HTTPServer.prototype;
-
-/**
- * Initialize the server.
- *
- * @param {Array} middleware
- * @api private
- */
-
-app.init = function(middleware){
- var self = this;
- this.cache = {};
- this.settings = {};
- this.redirects = {};
- this.isCallbacks = {};
- this._locals = {};
- this.dynamicViewHelpers = {};
- this.errorHandlers = [];
-
- this.set('env', process.env.NODE_ENV || 'development');
-
- // expose objects to each other
- this.use(function(req, res, next){
- req.query = req.query || {};
- res.setHeader('X-Powered-By', 'Express');
- req.app = res.app = self;
- req.res = res;
- res.req = req;
- req.next = next;
- // assign req.query
- if (req.url.indexOf('?') > 0) {
- var query = url.parse(req.url).query;
- req.query = qs.parse(query);
- }
- next();
- });
-
- // apply middleware
- if (middleware) middleware.forEach(self.use.bind(self));
-
- // router
- this.routes = new Router(this);
- this.__defineGetter__('router', function(){
- this.__usedRouter = true;
- return self.routes.middleware;
- });
-
- // default locals
- this.locals({
- settings: this.settings
- , app: this
- });
-
- // default development configuration
- this.configure('development', function(){
- this.enable('hints');
- });
-
- // default production configuration
- this.configure('production', function(){
- this.enable('view cache');
- });
-
- // register error handlers on "listening"
- // so that they disregard definition position.
- this.on('listening', this.registerErrorHandlers.bind(this));
-
- // route manipulation methods
- methods.forEach(function(method){
- self.lookup[method] = function(path){
- return self.routes.lookup(method, path);
- };
-
- self.match[method] = function(path){
- return self.routes.match(method, path);
- };
-
- self.remove[method] = function(path){
- return self.routes.lookup(method, path).remove();
- };
- });
-
- // del -> delete
- self.lookup.del = self.lookup.delete;
- self.match.del = self.match.delete;
- self.remove.del = self.remove.delete;
-};
-
-/**
- * Remove routes matching the given `path`.
- *
- * @param {Route} path
- * @return {Boolean}
- * @api public
- */
-
-app.remove = function(path){
- return this.routes.lookup('all', path).remove();
-};
-
-/**
- * Lookup routes defined with a path
- * equivalent to `path`.
- *
- * @param {Stirng} path
- * @return {Array}
- * @api public
- */
-
-app.lookup = function(path){
- return this.routes.lookup('all', path);
-};
-
-/**
- * Lookup routes matching the given `url`.
- *
- * @param {Stirng} url
- * @return {Array}
- * @api public
- */
-
-app.match = function(url){
- return this.routes.match('all', url);
-};
-
-/**
- * When using the vhost() middleware register error handlers.
- */
-
-app.onvhost = function(){
- this.registerErrorHandlers();
-};
-
-/**
- * Register error handlers.
- *
- * @return {Server} for chaining
- * @api public
- */
-
-app.registerErrorHandlers = function(){
- this.errorHandlers.forEach(function(fn){
- this.use(function(err, req, res, next){
- fn.apply(this, arguments);
- });
- }, this);
- return this;
-};
-
-/**
- * Proxy `connect.HTTPServer#use()` to apply settings to
- * mounted applications.
- *
- * @param {String|Function|Server} route
- * @param {Function|Server} middleware
- * @return {Server} for chaining
- * @api public
- */
-
-app.use = function(route, middleware){
- var app, base, handle;
-
- if ('string' != typeof route) {
- middleware = route, route = '/';
- }
-
- // express app
- if (middleware.handle && middleware.set) app = middleware;
-
- // restore .app property on req and res
- if (app) {
- app.route = route;
- middleware = function(req, res, next) {
- var orig = req.app;
- app.handle(req, res, function(err){
- req.app = res.app = orig;
- next(err);
- });
- };
- }
-
- connect.HTTPServer.prototype.use.call(this, route, middleware);
-
- // mounted an app, invoke the hook
- // and adjust some settings
- if (app) {
- base = this.set('basepath') || this.route;
- if ('/' == base) base = '';
- base = base + (app.set('basepath') || app.route);
- app.set('basepath', base);
- app.parent = this;
- if (app.__mounted) app.__mounted.call(app, this);
- }
-
- return this;
-};
-
-/**
- * Assign a callback `fn` which is called
- * when this `Server` is passed to `Server#use()`.
- *
- * Examples:
- *
- * var app = express.createServer()
- * , blog = express.createServer();
- *
- * blog.mounted(function(parent){
- * // parent is app
- * // "this" is blog
- * });
- *
- * app.use(blog);
- *
- * @param {Function} fn
- * @return {Server} for chaining
- * @api public
- */
-
-app.mounted = function(fn){
- this.__mounted = fn;
- return this;
-};
-
-/**
- * See: view.register.
- *
- * @return {Server} for chaining
- * @api public
- */
-
-app.register = function(){
- view.register.apply(this, arguments);
- return this;
-};
-
-/**
- * Register the given view helpers `obj`. This method
- * can be called several times to apply additional helpers.
- *
- * @param {Object} obj
- * @return {Server} for chaining
- * @api public
- */
-
-app.helpers =
-app.locals = function(obj){
- utils.merge(this._locals, obj);
- return this;
-};
-
-/**
- * Register the given dynamic view helpers `obj`. This method
- * can be called several times to apply additional helpers.
- *
- * @param {Object} obj
- * @return {Server} for chaining
- * @api public
- */
-
-app.dynamicHelpers = function(obj){
- utils.merge(this.dynamicViewHelpers, obj);
- return this;
-};
-
-/**
- * Map the given param placeholder `name`(s) to the given callback(s).
- *
- * Param mapping is used to provide pre-conditions to routes
- * which us normalized placeholders. This callback has the same
- * signature as regular middleware, for example below when ":userId"
- * is used this function will be invoked in an attempt to load the user.
- *
- * app.param('userId', function(req, res, next, id){
- * User.find(id, function(err, user){
- * if (err) {
- * next(err);
- * } else if (user) {
- * req.user = user;
- * next();
- * } else {
- * next(new Error('failed to load user'));
- * }
- * });
- * });
- *
- * Passing a single function allows you to map logic
- * to the values passed to `app.param()`, for example
- * this is useful to provide coercion support in a concise manner.
- *
- * The following example maps regular expressions to param values
- * ensuring that they match, otherwise passing control to the next
- * route:
- *
- * app.param(function(name, regexp){
- * if (regexp instanceof RegExp) {
- * return function(req, res, next, val){
- * var captures;
- * if (captures = regexp.exec(String(val))) {
- * req.params[name] = captures;
- * next();
- * } else {
- * next('route');
- * }
- * }
- * }
- * });
- *
- * We can now use it as shown below, where "/commit/:commit" expects
- * that the value for ":commit" is at 5 or more digits. The capture
- * groups are then available as `req.params.commit` as we defined
- * in the function above.
- *
- * app.param('commit', /^\d{5,}$/);
- *
- * For more of this useful functionality take a look
- * at [express-params](http://github.com/visionmedia/express-params).
- *
- * @param {String|Array|Function} name
- * @param {Function} fn
- * @return {Server} for chaining
- * @api public
- */
-
-app.param = function(name, fn){
- var self = this
- , fns = [].slice.call(arguments, 1);
-
- // array
- if (Array.isArray(name)) {
- name.forEach(function(name){
- fns.forEach(function(fn){
- self.param(name, fn);
- });
- });
- // param logic
- } else if ('function' == typeof name) {
- this.routes.param(name);
- // single
- } else {
- if (':' == name[0]) name = name.substr(1);
- fns.forEach(function(fn){
- self.routes.param(name, fn);
- });
- }
-
- return this;
-};
-
-/**
- * Assign a custom exception handler callback `fn`.
- * These handlers are always _last_ in the middleware stack.
- *
- * @param {Function} fn
- * @return {Server} for chaining
- * @api public
- */
-
-app.error = function(fn){
- this.errorHandlers.push(fn);
- return this;
-};
-
-/**
- * Register the given callback `fn` for the given `type`.
- *
- * @param {String} type
- * @param {Function} fn
- * @return {Server} for chaining
- * @api public
- */
-
-app.is = function(type, fn){
- if (!fn) return this.isCallbacks[type];
- this.isCallbacks[type] = fn;
- return this;
-};
-
-/**
- * Assign `setting` to `val`, or return `setting`'s value.
- * Mounted servers inherit their parent server's settings.
- *
- * @param {String} setting
- * @param {String} val
- * @return {Server|Mixed} for chaining, or the setting value
- * @api public
- */
-
-app.set = function(setting, val){
- if (val === undefined) {
- if (this.settings.hasOwnProperty(setting)) {
- return this.settings[setting];
- } else if (this.parent) {
- return this.parent.set(setting);
- }
- } else {
- this.settings[setting] = val;
- return this;
- }
-};
-
-/**
- * Check if `setting` is enabled.
- *
- * @param {String} setting
- * @return {Boolean}
- * @api public
- */
-
-app.enabled = function(setting){
- return !!this.set(setting);
-};
-
-/**
- * Check if `setting` is disabled.
- *
- * @param {String} setting
- * @return {Boolean}
- * @api public
- */
-
-app.disabled = function(setting){
- return !this.set(setting);
-};
-
-/**
- * Enable `setting`.
- *
- * @param {String} setting
- * @return {Server} for chaining
- * @api public
- */
-
-app.enable = function(setting){
- return this.set(setting, true);
-};
-
-/**
- * Disable `setting`.
- *
- * @param {String} setting
- * @return {Server} for chaining
- * @api public
- */
-
-app.disable = function(setting){
- return this.set(setting, false);
-};
-
-/**
- * Redirect `key` to `url`.