Readme.md
This file
Path
Readme.md
103 lines · 3.0 KiB · Markdown
Last changed by
Updated featuresvisionmediabefore adoption64a4741
History of this fileTake it
The walk stopped after 200 commits: lines older than 5db80e5 point at it.
Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
line 1why, one step back1No more ASCII artvisionmediabefore adoptionbf03e85
lines 2–3why, one step back2# Express3 Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
lines 4–10why, one step back4 Insanely fast (and small) server-side JavaScript web development framework5 built on **node.js** and the **V8 JavaScript engine**.67 * Stay tuned, coming soon :)89## Features (so far)10Updated featuresvisionmediabefore adoption64a4741
lines 11–12why, one step back11 * Sexy DSL with robust sinatra-like routing12 * High performancePatched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
lines 13–15why, one step back13 * Mime helpers14 * Nested parameter parsing15 * Full test coverageUpdated featuresvisionmediabefore adoption64a4741
line 16why, one step back16 * Extremely readable specsPatched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
line 17why, one step back17 * Test helpers (mock requests etc)Updated featuresvisionmediabefore adoption64a4741
lines 18–19why, one step back18 * Environment based configuration19 * Light-weight JavaScript class implementation via js-ooCollection readmevisionmediabefore adoption460c2a0
line 20why, one step back20 * Collections and chainable iteratorsPatched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
lines 21–26why, one step back2122## Performance2324 Extensive benchmarking will wait until a development version25 has been released. However for simple an average route and response26 body Ruby's Sinatra scored **1454** request per second using Thin, whileUpdated benchmarkingvisionmediabefore adoptioncdaca71
lines 27–30why, one step back27 Express scored **3600**.28 29 Currently Express can chew through **1000** simple requests with a 30 concurrency of **40** in **0.262** seconds.Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
lines 31–33why, one step back3132## Examples33Renaming some spec filesvisionmediabefore adoption340cd1d
lines 34–35why, one step back34 require.paths.unshift("./lib")35 require('express')Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
line 36why, one step back36 Renaming some spec filesvisionmediabefore adoption340cd1d
line 37why, one step back37 set('views', dirname(__filename) + '/views')Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
line 38why, one step back38 Renaming some spec filesvisionmediabefore adoption340cd1d
lines 39–43why, one step back39 get('/user/:id?', function() {40 if (param('id'))41 return 'Viewing user ' + param('id')42 return 'Your user account'43 })Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
lines 44–46why, one step back44 45## Settings46Renaming some spec filesvisionmediabefore adoption340cd1d
lines 47–48why, one step back47 set('views', '/path/to/views')48 set('views') // => '/path/to/views'Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
line 49why, one step back49 Renaming some spec filesvisionmediabefore adoption340cd1d
lines 50–52why, one step back50 enable('foo')51 disable('bar')52 Collection readmevisionmediabefore adoption460c2a0
lines 53–55why, one step back53## Collections5455Express ships with the Collection class, allowingRenaming some spec filesvisionmediabefore adoption340cd1d
line 56why, one step back56you to chain iterations on array-like objects and objects.Collection readmevisionmediabefore adoption460c2a0
lines 57–62why, one step back5758 $(['tj', 'matt', 'taylor'])59 .select(function(name){ return name.charAt(0) == 't' })60 .reject(function(name){ return name.length < 4 })61 .first()62Readme for testingvisionmediabefore adoption34a55ba
lines 63–67why, one step back63## Running Tests6465Express uses the [JSpec](http://jspec.info) BDD JavaScript testing66framework to write and run elegant spec suites. JSpec is froozen 67to spec/lib and does not require seperate installation.Patched JSpec to work with nodes apisvisionmediabefore adoption5db80e5
lines 68–103why, one step back6869To run all specifications:7071 $ make test72 73Run individual suites:7475 $ node spec/spec.node.js core76 $ node spec/spec.node.js mime77 $ node spec/spec.node.js routing78 ...79 80## License 8182(The MIT License)8384Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>8586Permission is hereby granted, free of charge, to any person obtaining87a copy of this software and associated documentation files (the88'Software'), to deal in the Software without restriction, including89without limitation the rights to use, copy, modify, merge, publish,90distribute, sublicense, and/or sell copies of the Software, and to91permit persons to whom the Software is furnished to do so, subject to92the following conditions:9394The above copyright notice and this permission notice shall be95included in all copies or substantial portions of the Software.9697THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,98EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF99MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.100IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY101CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,102TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE103SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.