Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 148 lines (101 sloc) 4.978 kb
8675f12 @tj New doc files
tj authored
1
bf03e85 @tj No more ASCII art
tj authored
2 # Express
3
8675f12 @tj New doc files
tj authored
4 Insanely fast (and small) server-side JavaScript web development framework
a2e93eb @tj Fixed Connect links
tj authored
5 built on [node](http://nodejs.org) and [Connect](http://github.com/senchalabs/connect).
1f12c53 @tj Added Connect port notice
tj authored
6
1f9f47f @tj Readme
tj authored
7 var app = express.createServer();
afd2b4b @tj Removed alternate installation methods (use git, tarball, or npm)
tj authored
8
1f9f47f @tj Readme
tj authored
9 app.get('/', function(req, res){
4f4987e @tj misc
tj authored
10 res.send('Hello World');
1f9f47f @tj Readme
tj authored
11 });
afd2b4b @tj Removed alternate installation methods (use git, tarball, or npm)
tj authored
12
13 app.listen(3000);
3d41c61 @tj Updated docs
tj authored
14
63d02f1 @tj Install docs
tj authored
15 ## Installation
16
17 $ npm install express
18
0cb8668 @tj npm 1.x docs
tj authored
19 or to access the `express(1)` executable install globally:
20
21 $ npm install -g express
22
723774a @tj added quick start to guide
tj authored
23 ## Quick Start
c3fbd3f @tj express(1) usage docs
tj authored
24
25 The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below:
26
27 Create the app:
28
29 $ npm install -g express
30 $ express /tmp/foo && cd /tmp/foo
31
32 Install dependencies:
33
34 $ npm install -d
35
36 Start the server:
37
38 $ node app.js
39
2732d2b @tj Updated docs
tj authored
40 ## Features
8675f12 @tj New doc files
tj authored
41
1f9f47f @tj Readme
tj authored
42 * Robust routing
54d36f3 @tj Removed traces of connect.redirect()
tj authored
43 * Redirection helpers
7eb088b @tj Added app.helpers() docs
tj authored
44 * Dynamic view helpers
2294f23 @tj Fixed connect links
tj authored
45 * Content negotiation
1f9f47f @tj Readme
tj authored
46 * Focus on high performance
47 * View rendering and partials support
2732d2b @tj Updated docs
tj authored
48 * Environment based configuration
1f9f47f @tj Readme
tj authored
49 * Session based flash notifications
2294f23 @tj Fixed connect links
tj authored
50 * Built on [Connect](http://github.com/senchalabs/connect)
a8865a5 @tj Misc docs
tj authored
51 * High test coverage
5e4d672 @tj Executable docs
tj authored
52 * Executable for generating applications quickly
4d98552 @tj Docs for "view options"
tj authored
53 * Application level view options
2732d2b @tj Updated docs
tj authored
54
55 Via Connect:
56
327d5b0 @tj Readme
tj authored
57 * Session support
088aa83 @tj Updated feature list
tj authored
58 * Cache API
8675f12 @tj New doc files
tj authored
59 * Mime helpers
8b6c4d3 @tj Updated history
tj authored
60 * ETag support
2732d2b @tj Updated docs
tj authored
61 * Persistent flash notifications
bd6f24f @aheckmann add cookie support to readme
aheckmann authored
62 * Cookie support
2732d2b @tj Updated docs
tj authored
63 * JSON-RPC
64 * Logging
65 * and _much_ more!
bbb858e @tj Added install section in readme
tj authored
66
1f9f47f @tj Readme
tj authored
67 ## Contributors
0c82752 @tj Added npm install docs
tj authored
68
1f9f47f @tj Readme
tj authored
69 The following are the major contributors of Express (in no specific order).
0c82752 @tj Added npm install docs
tj authored
70
1f9f47f @tj Readme
tj authored
71 * TJ Holowaychuk ([visionmedia](http://github.com/visionmedia))
72 * Ciaran Jessup ([ciaranj](http://github.com/ciaranj))
73 * Aaron Heckmann ([aheckmann](http://github.com/aheckmann))
6cf4629 @tj Added Guillermo Rauch to the contributor list
tj authored
74 * Guillermo Rauch ([guille](http://github.com/guille))
0c82752 @tj Added npm install docs
tj authored
75
1f9f47f @tj Readme
tj authored
76 ## More Information
e99c279 @tj Docs
tj authored
77
f0277d3 @tj #express on freenode
tj authored
78 * #express on freenode
961146a @tj link to express-expose
tj authored
79 * [express-expose](http://github.com/visionmedia/express-expose) expose objects, functions, modules and more to client-side js with ease
1f520f9 @tj added express-resource to readme
tj authored
80 * [express-resource](http://github.com/visionmedia/express-resource) resourceful routing
b122bf2 @tj link typo
tj authored
81 * [express-configure](http://github.com/visionmedia/express-configuration) async configuration support
6813b48 @tj replaced link to express-contrib with new solo repos
tj authored
82 * [express-messages](http://github.com/visionmedia/express-messages) flash notification rendering helper
83 * [express-namespace](http://github.com/visionmedia/express-namespace) namespaced route support
15d4047 @tj link
tj authored
84 * [express-params](https://github.com/visionmedia/express-params) param pre-condition functions
5b33788 @tj express-mongoose link
tj authored
85 * [express-mongoose](https://github.com/LearnBoost/express-mongoose) plugin for easy rendering of Mongoose async Query results
1f9f47f @tj Readme
tj authored
86 * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates
87 * [Google Group](http://groups.google.com/group/express-js) for discussion
1444439 @tj Wiki
tj authored
88 * Visit the [Wiki](http://github.com/visionmedia/express/wiki)
40ccb59 @tj "Japanese Documentation" in Japanese 日本語ドキュメンテーション :)
tj authored
89 * [日本語ドキュメンテーション](http://hideyukisaito.com/doc/expressjs/) by [hideyukisaito](https://github.com/hideyukisaito)
7eeec91 @tj russian docs
tj authored
90 * [Русскоязычная документация](http://express-js.ru/)
6c0a416 @tj Added view partials screencast link
tj authored
91 * Screencast - [Introduction](http://bit.ly/eRYu0O)
92 * Screencast - [View Partials](http://bit.ly/dU13Fx)
adcfd4c @tj Added more screencast links
tj authored
93 * Screencast - [Route Specific Middleware](http://bit.ly/hX4IaH)
94 * Screencast - [Route Path Placeholder Preconditions](http://bit.ly/eNqmVs)
9973bd7 @nomiddlename Added example, extra info to Readme
nomiddlename authored
95
b311118 @tj Removed testing docs from readme
tj authored
96 ## Node Compatibility
40b3116 @tj Tasks
tj authored
97
b9e311e @tj version docs
tj authored
98 Express 1.x is compatible with node 0.2.x and connect < 1.0.
7705042 @tj docs
tj authored
99
b9e311e @tj version docs
tj authored
100 Express 2.x is compatible with node 0.4.x and connect 1.x
7eca74a @tj Updated node --version in readme
tj authored
101
3a04888 @tj docs
tj authored
102 Express 3.x (_master_ branch) is compatible with node 0.6.x and connect 2.x
103
7aea719 @tj example docs
tj authored
104 ## Viewing Examples
105
106 First install the dev dependencies to install all the example / test suite deps:
107
05b76a1 @tj prepping blog example for new express
tj authored
108 $ npm install -d
7aea719 @tj example docs
tj authored
109
110 then run whichever tests you want:
111
112 $ node examples/jade/app.js
113
31a8c7c @tj test docs
tj authored
114 ## Running Tests
115
116 To run the test suite first invoke the following command within the repo, installing the development dependencies:
117
118 $ npm install
119
120 then run the tests:
121
122 $ make test
123
fa08323 @tj Markdown
tj authored
124 ## License
8675f12 @tj New doc files
tj authored
125
126 (The MIT License)
127
9914a1e @tj copyright
tj authored
128 Copyright (c) 2009-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
8675f12 @tj New doc files
tj authored
129
130 Permission is hereby granted, free of charge, to any person obtaining
131 a copy of this software and associated documentation files (the
132 'Software'), to deal in the Software without restriction, including
133 without limitation the rights to use, copy, modify, merge, publish,
134 distribute, sublicense, and/or sell copies of the Software, and to
135 permit persons to whom the Software is furnished to do so, subject to
136 the following conditions:
137
138 The above copyright notice and this permission notice shall be
139 included in all copies or substantial portions of the Software.
140
141 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
142 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
143 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
144 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
145 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
146 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
4858502 @nomiddlename Asynchronous handlers working.
nomiddlename authored
147 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.