Skip to content
Myr

Readme.md

This file

Path

Readme.md

104 lines · 3.1 KiB · Markdown

Last changed by

Docsvisionmediabefore adoption08ada90

History of this file

Take it

The walk stopped after 200 commits: lines older than 15efc34 point at it.

Added user.json fixturevisionmediabefore adoption15efc34

lines 1–6why, one step back
1
2# Express3 4 Insanely fast (and small) server-side JavaScript web development framework5 built on **node.js** and the **V8 JavaScript engine**.6

Fixed wiki urivisionmediabefore adoptionf09358b

line 7why, one step back
7 Visit the [Wiki](http://wiki.github.com/visionmedia/express) for documentation

Added user.json fixturevisionmediabefore adoption15efc34

lines 8–10why, one step back
8
9## Features (so far)10

Updated featuresvisionmediabefore adoption64a4741

lines 11–12why, one step back
11 * Sexy DSL with robust sinatra-like routing
12 * High performance

Added user.json fixturevisionmediabefore adoption15efc34

line 13why, one step back
13 * Mime helpers

Docsvisionmediabefore adoptionf0f71cc

line 14why, one step back
14 * Redirection helpers

Added user.json fixturevisionmediabefore adoption15efc34

lines 15–16why, one step back
15 * Nested parameter parsing
16 * Full test coverage

Updated featuresvisionmediabefore adoption64a4741

line 17why, one step back
17 * Extremely readable specs

Added user.json fixturevisionmediabefore adoption15efc34

line 18why, one step back
18 * Test helpers (mock requests etc)

Updated featuresvisionmediabefore adoption64a4741

lines 19–20why, one step back
19 * Environment based configuration
20 * Light-weight JavaScript class implementation via js-oo

Collection readmevisionmediabefore adoption460c2a0

line 21why, one step back
21 * Collections and chainable iterators

Docsvisionmediabefore adoption08ada90

line 22why, one step back
22 * ElementCollections / markup parsing via libxmljs and css selector traversal support via css2xpath

Added haml to list of supported template enginesvisionmediabefore adoption7d36c6a

line 23why, one step back
23 * View support (ejs, haml, mustache)

Added user.json fixturevisionmediabefore adoption15efc34

lines 24–29why, one step back
24
25## 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, while

Updated benchmarkingvisionmediabefore adoptioncdaca71

lines 30–33why, one step back
30 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 back
34
35## Examples36

Better app example in readmevisionmediabefore adoption74e0231

line 37why, one step back
37 require.paths.unshift('lib')

Docsvisionmediabefore adoption9b8d417

lines 38–40why, one step back
38 require('express')
39 require('express/plugins')40

Better app example in readmevisionmediabefore adoption74e0231

lines 41–47why, one step back
41 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 back
48

Better app example in readmevisionmediabefore adoption74e0231

lines 49–59why, one step back
49 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 back
60 })
61 62 run()

Added user.json fixturevisionmediabefore adoption15efc34

lines 63–104why, one step back
63
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.