Readme.md
This file
Path
Readme.md
109 lines · 3.0 KiB · Markdown
Last changed by
Renaming some spec filesvisionmediabefore adoption340cd1d
History of this fileTake it
Markdownvisionmediabefore adoptionfa08323
line 1why, one step back1No more ASCII artvisionmediabefore adoptionbf03e85
lines 2–3why, one step back2# Express3 Markdownvisionmediabefore adoptionfa08323
line 4why, one step back4 Insanely fast (and small) server-side JavaScript web development frameworkDocsvisionmediabefore adoption9f06b11
line 5why, one step back5 built on **node.js** and the **V8 JavaScript engine**.Markdownvisionmediabefore adoptionfa08323
lines 6–21why, one step back67 * Stay tuned, coming soon :)89## Features (so far)1011 * Sexy DSL12 * Mime helpers13 * Nested parameter parsing14 * Full test coverage15 * Test helpers (mock requests etc)16 * Cookie support17 * Session support18 * Faux method support for RESTful apps19 * Extendable using Express 'Modules'20 * Static file serving21 * View supportCollection readmevisionmediabefore adoption460c2a0
line 22why, one step back22 * Collections and chainable iteratorsMarkdownvisionmediabefore adoptionfa08323
lines 23–29why, one step back23 * Routing24 * string matching 25 * regexp with captures 26 * param key substitution27 * pre-conditions28 * overidding29 * etcAdded example, extra info to Readmecsausdevbefore adoption9973bd7
line 30why, one step back30Markdownvisionmediabefore adoptionfa08323
lines 31–34why, one step back31## Performance3233 Extensive benchmarking will wait until a development version34 has been released. However for simple an average route and responseDocsvisionmediabefore adoption9f06b11
lines 35–36why, one step back35 body Ruby's Sinatra scored **1454** request per second using Thin, while36 Express scored **2762**.Markdownvisionmediabefore adoptionfa08323
lines 37–38why, one step back3738## ExamplesAdded example, extra info to Readmecsausdevbefore adoption9973bd7
line 39why, one step back39Renaming some spec filesvisionmediabefore adoption340cd1d
lines 40–41why, one step back40 require.paths.unshift("./lib")41 require('express')Markdownvisionmediabefore adoptionfa08323
line 42why, one step back42 Renaming some spec filesvisionmediabefore adoption340cd1d
line 43why, one step back43 set('views', dirname(__filename) + '/views')Markdownvisionmediabefore adoptionfa08323
line 44why, one step back44 Renaming some spec filesvisionmediabefore adoption340cd1d
lines 45–49why, one step back45 get('/user/:id?', function() {46 if (param('id'))47 return 'Viewing user ' + param('id')48 return 'Your user account'49 })Markdownvisionmediabefore adoptionfa08323
lines 50–52why, one step back50 51## Settings52Renaming some spec filesvisionmediabefore adoption340cd1d
lines 53–54why, one step back53 set('views', '/path/to/views')54 set('views') // => '/path/to/views'Markdownvisionmediabefore adoptionfa08323
line 55why, one step back55 Renaming some spec filesvisionmediabefore adoption340cd1d
lines 56–58why, one step back56 enable('foo')57 disable('bar')58 Collection readmevisionmediabefore adoption460c2a0
lines 59–61why, one step back59## Collections6061Express ships with the Collection class, allowingRenaming some spec filesvisionmediabefore adoption340cd1d
line 62why, one step back62you to chain iterations on array-like objects and objects.Collection readmevisionmediabefore adoption460c2a0
lines 63–68why, one step back6364 $(['tj', 'matt', 'taylor'])65 .select(function(name){ return name.charAt(0) == 't' })66 .reject(function(name){ return name.length < 4 })67 .first()68Readme for testingvisionmediabefore adoption34a55ba
lines 69–73why, one step back69## Running Tests7071Express uses the [JSpec](http://jspec.info) BDD JavaScript testing72framework to write and run elegant spec suites. JSpec is froozen 73to spec/lib and does not require seperate installation.Markdownvisionmediabefore adoptionfa08323
line 74why, one step back74Updated readme with new spec running infovisionmediabefore adoption8e23ebb
line 75why, one step back75To run all specifications:Markdownvisionmediabefore adoptionfa08323
line 76why, one step back76Updated readme with new spec running infovisionmediabefore adoption8e23ebb
line 77why, one step back77 $ make testAmended readme for running individual specscsausdevbefore adoption7459e7d
line 78why, one step back78 Updated readme with new spec running infovisionmediabefore adoption8e23ebb
line 79why, one step back79Run individual suites:Amended readme for running individual specscsausdevbefore adoption7459e7d
lines 80–81why, one step back8081 $ node spec/spec.node.js coreUpdated readme with new spec running infovisionmediabefore adoption8e23ebb
lines 82–84why, one step back82 $ node spec/spec.node.js mime83 $ node spec/spec.node.js routing84 ...Link to Mojo mustache templatesvisionmediabefore adoptionfde2bfc
line 85why, one step back85 Markdownvisionmediabefore adoptionfa08323
lines 86–109why, one step back86## License 8788(The MIT License)8990Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>9192Permission is hereby granted, free of charge, to any person obtaining93a copy of this software and associated documentation files (the94'Software'), to deal in the Software without restriction, including95without limitation the rights to use, copy, modify, merge, publish,96distribute, sublicense, and/or sell copies of the Software, and to97permit persons to whom the Software is furnished to do so, subject to98the following conditions:99100The above copyright notice and this permission notice shall be101included in all copies or substantial portions of the Software.102103THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,104EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF105MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.106IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY107CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,108TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE109SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.