Readme.md
This file
Path
Readme.md
104 lines · 3.1 KiB · Markdown
Last changed by
Docsvisionmediabefore adoption08ada90
History of this fileTake it
The walk stopped after 200 commits: lines older than 15efc34 point at it.
Added user.json fixturevisionmediabefore adoption15efc34
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**.6Fixed wiki urivisionmediabefore adoptionf09358b
line 7why, one step back7 Visit the [Wiki](http://wiki.github.com/visionmedia/express) for documentationAdded user.json fixturevisionmediabefore adoption15efc34
lines 8–10why, one step back89## Features (so far)10Updated featuresvisionmediabefore adoption64a4741
lines 11–12why, one step back11 * Sexy DSL with robust sinatra-like routing12 * High performanceAdded user.json fixturevisionmediabefore adoption15efc34
line 13why, one step back13 * Mime helpersDocsvisionmediabefore adoptionf0f71cc
line 14why, one step back14 * Redirection helpersAdded user.json fixturevisionmediabefore adoption15efc34
lines 15–16why, one step back15 * Nested parameter parsing16 * Full test coverageUpdated featuresvisionmediabefore adoption64a4741
line 17why, one step back17 * Extremely readable specsAdded user.json fixturevisionmediabefore adoption15efc34
line 18why, one step back18 * Test helpers (mock requests etc)Updated featuresvisionmediabefore adoption64a4741
lines 19–20why, one step back19 * Environment based configuration20 * Light-weight JavaScript class implementation via js-ooCollection readmevisionmediabefore adoption460c2a0
line 21why, one step back21 * Collections and chainable iteratorsDocsvisionmediabefore adoption08ada90
line 22why, one step back22 * ElementCollections / markup parsing via libxmljs and css selector traversal support via css2xpathAdded haml to list of supported template enginesvisionmediabefore adoption7d36c6a
line 23why, one step back23 * View support (ejs, haml, mustache)Added user.json fixturevisionmediabefore adoption15efc34
lines 24–29why, one step back2425## Performance2627 Extensive benchmarking will wait until a development version28 has been released. However for simple an average route and response29 body Ruby's Sinatra scored **1454** request per second using Thin, whileUpdated benchmarkingvisionmediabefore adoptioncdaca71
lines 30–33why, one step back30 Express scored **3600**.31 32 Currently Express can chew through **1000** simple requests with a 33 concurrency of **40** in **0.262** seconds.Added user.json fixturevisionmediabefore adoption15efc34
lines 34–36why, one step back3435## Examples36Better app example in readmevisionmediabefore adoption74e0231
line 37why, one step back37 require.paths.unshift('lib')Docsvisionmediabefore adoption9b8d417
lines 38–40why, one step back38 require('express')39 require('express/plugins')40 Better app example in readmevisionmediabefore adoption74e0231
lines 41–47why, one step back41 configure(function(){42 use(MethodOverride)43 use(ContentLength)44 use(Redirect)45 set('root', dirname(__filename))46 enable('cache views')47 })Docsvisionmediabefore adoption9b8d417
line 48why, one step back48 Better app example in readmevisionmediabefore adoption74e0231
lines 49–59why, one step back49 get('/hello', function(){50 contentType('html')51 return '<h1>World<h1>'52 })53 54 get('/user/:id?', function(id) {55 render('user.haml.html', {56 locals: {57 name: id ? 'User ' + id : 'You' 58 }59 })Docsvisionmediabefore adoption9b8d417
lines 60–62why, one step back60 })61 62 run()Added user.json fixturevisionmediabefore adoption15efc34
lines 63–104why, one step back63 64## Running Tests6566Express uses the [JSpec](http://jspec.info) BDD JavaScript testing67framework to write and run elegant spec suites. JSpec is froozen 68to spec/lib and does not require seperate installation.6970To run all specifications:7172 $ make test73 74Run individual suites:7576 $ node spec/spec.node.js core77 $ node spec/spec.node.js mime78 $ node spec/spec.node.js routing79 ...80 81## License 8283(The MIT License)8485Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>8687Permission is hereby granted, free of charge, to any person obtaining88a copy of this software and associated documentation files (the89'Software'), to deal in the Software without restriction, including90without limitation the rights to use, copy, modify, merge, publish,91distribute, sublicense, and/or sell copies of the Software, and to92permit persons to whom the Software is furnished to do so, subject to93the following conditions:9495The above copyright notice and this permission notice shall be96included in all copies or substantial portions of the Software.9798THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,99EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF100MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.101IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY102CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,103TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE104SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.