Readme.md
This file
Path
Readme.md
143 lines · 4.7 KiB · Markdown
Last changed by
Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptionae33e7b
History of this fileTake it
The walk stopped after 200 commits: lines older than eaa399f point at it.
Started specs for viewsvisionmediabefore adoptioneaa399f
lines 1–6why, one step back12# Express3 4 Insanely fast (and small) server-side JavaScript web development framework5 built on **node.js** and the **V8 JavaScript engine**.6Added Google Groups linkvisionmediabefore adoptionec00ccb
lines 7–8why, one step back7 * Visit the [Wiki](http://wiki.github.com/visionmedia/express) for documentation8 * Visit the [Google Group](http://groups.google.com/group/express-js) for discussionStarted specs for viewsvisionmediabefore adoptioneaa399f
lines 9–14why, one step back910## Features (so far)1112 * Sexy DSL with robust sinatra-like routing13 * High performance14 * Mime helpersDocsvisionmediabefore adoptionf0f71cc
line 15why, one step back15 * Redirection helpersStarted specs for viewsvisionmediabefore adoptioneaa399f
lines 16–22why, one step back16 * Nested parameter parsing17 * Full test coverage18 * Extremely readable specs19 * Test helpers (mock requests etc)20 * Environment based configuration21 * Light-weight JavaScript class implementation via js-oo22 * Collections and chainable iteratorsDocsvisionmediabefore adoption08ada90
line 23why, one step back23 * ElementCollections / markup parsing via libxmljs and css selector traversal support via css2xpathAdded haml to list of supported template enginesvisionmediabefore adoption7d36c6a
line 24why, one step back24 * View support (ejs, haml, mustache)Added install section in readmevisionmediabefore adoptionbbb858e
lines 25–31why, one step back25 26## Installation2728Currently Express must be cloned (or downloaded), you can use the following command to29get rolling and initialize the submodule dependencies:3031 $ git clone git://github.com/visionmedia/express.git && cd express && git submodule update --init && make appAdded gh install sectionvisionmediabefore adoption3703179
lines 32–35why, one step back32 33Or with the [gh](http://github.com/visionmedia/gh) utility:3435 $ gh clone visionmedia express && cd express && git submodule update --init && make appStarted specs for viewsvisionmediabefore adoptioneaa399f
lines 36–39why, one step back3637## Performance3839 Extensive benchmarking will wait until a development versionNew benchmarks with 2 haml viewsvisionmediabefore adoption9181f7d
line 40why, one step back40 has been released. Started specs for viewsvisionmediabefore adoptioneaa399f
line 41why, one step back41 Readme formattingvisionmediabefore adoption73efcb5
lines 42–43why, one step back42 Currently Express can chew through a request with a two Haml views (*page and layout*) 43 requested **2000** times with concurrency of **80** in **2.4** seconds and **814**NOTE: benchmarks implemented no cachingvisionmediabefore adoption4bbda07
line 44why, one step back44 requests per second. With no caching involved.New benchmarks with 2 haml viewsvisionmediabefore adoption9181f7d
line 45why, one step back45 Readme formattingvisionmediabefore adoption73efcb5
lines 46–47why, one step back46 An identical Sinatra application was served with the **Thin** HTTP server47 and scored **8.3** seconds and **238** requests per second. In this situationBenchmarksvisionmediabefore adoptionc5491c9
line 48why, one step back48 Express is currently **3.5** times faster than Sinatra.Started specs for viewsvisionmediabefore adoptioneaa399f
lines 49–51why, one step back4950## Examples51Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptionae33e7b
lines 52–53why, one step back52Below is a minimal app example when express is already within your load path.53Started specs for viewsvisionmediabefore adoptioneaa399f
lines 54–56why, one step back54 require('express')55 require('express/plugins')56 Better app example in readmevisionmediabefore adoption74e0231
lines 57–61why, one step back57 configure(function(){58 use(MethodOverride)59 use(ContentLength)60 set('root', dirname(__filename))61 })Started specs for viewsvisionmediabefore adoptioneaa399f
line 62why, one step back62 Better app example in readmevisionmediabefore adoption74e0231
line 63why, one step back63 get('/hello', function(){Fixed example app in readmevisionmediabefore adoption0bdff0f
line 64why, one step back64 this.contentType('html')Better app example in readmevisionmediabefore adoption74e0231
lines 65–68why, one step back65 return '<h1>World<h1>'66 })67 68 get('/user/:id?', function(id) {Fixed example app in readmevisionmediabefore adoption0bdff0f
line 69why, one step back69 this.render('user.haml.html', {Better app example in readmevisionmediabefore adoption74e0231
lines 70–73why, one step back70 locals: {71 name: id ? 'User ' + id : 'You' 72 }73 })Started specs for viewsvisionmediabefore adoptioneaa399f
lines 74–80why, one step back74 })75 76 run()77 78## Running Tests7980Express uses the [JSpec](http://jspec.info) BDD JavaScript testingMerge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption704c933
lines 81–82why, one step back81framework to write and run elegant spec suites. JSpec is frozen 82to spec/lib and does not require separate installation.Started specs for viewsvisionmediabefore adoptioneaa399f
line 83why, one step back83Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption3f9cbbb
lines 84–86why, one step back84To run all specifications run the following command. This will ensure85git submodules are initialized and updated, as well as building test86related dependencies such as libxmljs.Started specs for viewsvisionmediabefore adoptioneaa399f
lines 87–89why, one step back8788 $ make test89 Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption704c933
line 90why, one step back90To run independent specs (which do not require building of external apis etc) use:Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2
lines 91–93why, one step back9192 $ make test-independant93 Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption704c933
line 94why, one step back94To run dependent specs (which require building of external apis etc) use:Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2
lines 95–97why, one step back9596 $ make test-dependant97 Started specs for viewsvisionmediabefore adoptioneaa399f
lines 98–99why, one step back98Run individual suites:99Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption6f7141a
lines 100–102why, one step back100 $ node spec/node.js core101 $ node spec/node.js mime102 $ node spec/node.js routingStarted specs for viewsvisionmediabefore adoptioneaa399f
line 103why, one step back103 ...Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption6f7141a
line 104why, one step back104 Added node dev version to readmevisionmediabefore adoption9df1a1b
line 105why, one step back105Express is currently being developed with node --version:Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2
line 106why, one step back106 v0.1.24-13-ge2abc5fStarted specs for viewsvisionmediabefore adoptioneaa399f
line 107why, one step back107 Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption99e3130
lines 108–111why, one step back108## More Information109110 * [JavaScript Extensions & Utilities](http://github.com/visionmedia/ext.js)111 * [JavaScript Sass](http://github.com/visionmedia/sass.js)Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2
line 112why, one step back112 * [Scons Build System](http://www.scons.org/) (some development dependencies rely on this, ex libxmljs)Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption99e3130
line 113why, one step back113 Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption17ab8e8
lines 114–115why, one step back114## Contributors115Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption99e3130
lines 116–118why, one step back116 * TJ Holowaychuk (visionmedia) <tj@vision-media.ca>117 * Ciaran Jessup (ciaranj) <ciaranj@gmail.com>118 * Gareth Jones (csausdev) <gareth.jones@sensis.com.au>Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption17ab8e8
line 119why, one step back119 Started specs for viewsvisionmediabefore adoptioneaa399f
lines 120–123why, one step back120## License 121122(The MIT License)123Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption17ab8e8
line 124why, one step back124Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>Started specs for viewsvisionmediabefore adoptioneaa399f
lines 125–143why, one step back125126Permission is hereby granted, free of charge, to any person obtaining127a copy of this software and associated documentation files (the128'Software'), to deal in the Software without restriction, including129without limitation the rights to use, copy, modify, merge, publish,130distribute, sublicense, and/or sell copies of the Software, and to131permit persons to whom the Software is furnished to do so, subject to132the following conditions:133134The above copyright notice and this permission notice shall be135included in all copies or substantial portions of the Software.136137THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,138EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF139MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.140IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY141CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,142TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE143SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.