Readme.md
This file
Path
Readme.md
136 lines · 4.4 KiB · Markdown
Last changed by
Arch warning for testing binariesvisionmediabefore adoption19672e7
History of this fileTake it
The walk stopped after 200 commits: lines older than f09358b point at it.
Fixed wiki urivisionmediabefore adoptionf09358b
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 discussionFixed wiki urivisionmediabefore adoptionf09358b
lines 9–22why, one step back910## Features (so far)1112 * Sexy DSL with robust sinatra-like routing13 * High performance14 * Mime helpers15 * Redirection helpers16 * 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 css2xpathFixed wiki urivisionmediabefore adoptionf09358b
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 appFixed wiki urivisionmediabefore adoptionf09358b
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. Fixed wiki urivisionmediabefore adoptionf09358b
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.Fixed wiki urivisionmediabefore adoptionf09358b
lines 49–51why, one step back4950## Examples51Better app example in readmevisionmediabefore adoption74e0231
line 52why, one step back52 require.paths.unshift('lib')Fixed wiki urivisionmediabefore adoptionf09358b
lines 53–55why, one step back53 require('express')54 require('express/plugins')55 Better app example in readmevisionmediabefore adoption74e0231
lines 56–62why, one step back56 configure(function(){57 use(MethodOverride)58 use(ContentLength)59 use(Redirect)60 set('root', dirname(__filename))61 enable('cache views')62 })Fixed wiki urivisionmediabefore adoptionf09358b
line 63why, one step back63 Better app example in readmevisionmediabefore adoption74e0231
line 64why, one step back64 get('/hello', function(){Fixed example app in readmevisionmediabefore adoption0bdff0f
line 65why, one step back65 this.contentType('html')Better app example in readmevisionmediabefore adoption74e0231
lines 66–69why, one step back66 return '<h1>World<h1>'67 })68 69 get('/user/:id?', function(id) {Fixed example app in readmevisionmediabefore adoption0bdff0f
line 70why, one step back70 this.render('user.haml.html', {Better app example in readmevisionmediabefore adoption74e0231
lines 71–74why, one step back71 locals: {72 name: id ? 'User ' + id : 'You' 73 }74 })Fixed wiki urivisionmediabefore adoptionf09358b
lines 75–94why, one step back75 })76 77 run()78 79## Running Tests8081Express uses the [JSpec](http://jspec.info) BDD JavaScript testing82framework to write and run elegant spec suites. JSpec is froozen 83to spec/lib and does not require seperate installation.8485To run all specifications:8687 $ make test88 89Run individual suites:9091 $ node spec/spec.node.js core92 $ node spec/spec.node.js mime93 $ node spec/spec.node.js routing94 ...Arch warning for testing binariesvisionmediabefore adoption19672e7
lines 95–97why, one step back95 96Runnning libxmljs related specs, if you have an architecture issue97then you will need to rebuild _spec/support/libxmljs.node_.Added node dev version to readmevisionmediabefore adoption9df1a1b
lines 98–99why, one step back9899Express is currently being developed with node --version:Added encoding param to Request#halt() and Request#respond()visionmediabefore adoptiondd5d4cc
line 100why, one step back100 v0.1.21-66-g59a78d6Fixed wiki urivisionmediabefore adoptionf09358b
line 101why, one step back101 Added ext.js linkvisionmediabefore adoption881c63c
lines 102–104why, one step back102## More Information103104 * [JavaScript Extensions & Utilities](http://github.com/visionmedia/ext.js)Added Sass.js linkvisionmediabefore adoption2c92405
line 105why, one step back105 * [JavaScript Sass](http://github.com/visionmedia/sass.js)Added ext.js linkvisionmediabefore adoption881c63c
line 106why, one step back106 Added contributor listvisionmediabefore adoption3777bfd
lines 107–108why, one step back107## Contributors108Added ext.js linkvisionmediabefore adoption881c63c
lines 109–110why, one step back109 * TJ Holowaychuk (visionmedia) <tj@vision-media.ca>110 * Ciaran Jessup (ciaranj) <ciaranj@gmail.com>Added Gareth to contrib listvisionmediabefore adoption17c4168
line 111why, one step back111 * Gareth Jones (csausdev) <gareth.jones@sensis.com.au>Added contributor listvisionmediabefore adoption3777bfd
line 112why, one step back112 Fixed wiki urivisionmediabefore adoptionf09358b
lines 113–116why, one step back113## License 114115(The MIT License)116Added contributor listvisionmediabefore adoption3777bfd
line 117why, one step back117Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>Fixed wiki urivisionmediabefore adoptionf09358b
lines 118–136why, one step back118119Permission is hereby granted, free of charge, to any person obtaining120a copy of this software and associated documentation files (the121'Software'), to deal in the Software without restriction, including122without limitation the rights to use, copy, modify, merge, publish,123distribute, sublicense, and/or sell copies of the Software, and to124permit persons to whom the Software is furnished to do so, subject to125the following conditions:126127The above copyright notice and this permission notice shall be128included in all copies or substantial portions of the Software.129130THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,131EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF132MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.133IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY134CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,135TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE136SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.