Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 195 lines (148 sloc) 6.335 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 ## More Information
e99c279 @tj Docs
tj authored
68
f0277d3 @tj #express on freenode
tj authored
69 * #express on freenode
961146a @tj link to express-expose
tj authored
70 * [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
71 * [express-resource](http://github.com/visionmedia/express-resource) resourceful routing
b122bf2 @tj link typo
tj authored
72 * [express-configure](http://github.com/visionmedia/express-configuration) async configuration support
6813b48 @tj replaced link to express-contrib with new solo repos
tj authored
73 * [express-messages](http://github.com/visionmedia/express-messages) flash notification rendering helper
74 * [express-namespace](http://github.com/visionmedia/express-namespace) namespaced route support
15d4047 @tj link
tj authored
75 * [express-params](https://github.com/visionmedia/express-params) param pre-condition functions
5b33788 @tj express-mongoose link
tj authored
76 * [express-mongoose](https://github.com/LearnBoost/express-mongoose) plugin for easy rendering of Mongoose async Query results
1f9f47f @tj Readme
tj authored
77 * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates
78 * [Google Group](http://groups.google.com/group/express-js) for discussion
1444439 @tj Wiki
tj authored
79 * Visit the [Wiki](http://github.com/visionmedia/express/wiki)
40ccb59 @tj "Japanese Documentation" in Japanese 日本語ドキュメンテーション :)
tj authored
80 * [日本語ドキュメンテーション](http://hideyukisaito.com/doc/expressjs/) by [hideyukisaito](https://github.com/hideyukisaito)
7eeec91 @tj russian docs
tj authored
81 * [Русскоязычная документация](http://express-js.ru/)
6c0a416 @tj Added view partials screencast link
tj authored
82 * Screencast - [Introduction](http://bit.ly/eRYu0O)
83 * Screencast - [View Partials](http://bit.ly/dU13Fx)
adcfd4c @tj Added more screencast links
tj authored
84 * Screencast - [Route Specific Middleware](http://bit.ly/hX4IaH)
85 * Screencast - [Route Path Placeholder Preconditions](http://bit.ly/eNqmVs)
9973bd7 @nomiddlename Added example, extra info to Readme
nomiddlename authored
86
b311118 @tj Removed testing docs from readme
tj authored
87 ## Node Compatibility
40b3116 @tj Tasks
tj authored
88
b9e311e @tj version docs
tj authored
89 Express 1.x is compatible with node 0.2.x and connect < 1.0.
7705042 @tj docs
tj authored
90
b9e311e @tj version docs
tj authored
91 Express 2.x is compatible with node 0.4.x and connect 1.x
7eca74a @tj Updated node --version in readme
tj authored
92
3a04888 @tj docs
tj authored
93 Express 3.x (_master_ branch) is compatible with node 0.6.x and connect 2.x
94
7aea719 @tj example docs
tj authored
95 ## Viewing Examples
96
97 First install the dev dependencies to install all the example / test suite deps:
98
05b76a1 @tj prepping blog example for new express
tj authored
99 $ npm install -d
7aea719 @tj example docs
tj authored
100
101 then run whichever tests you want:
102
103 $ node examples/jade/app.js
104
31a8c7c @tj test docs
tj authored
105 ## Running Tests
106
107 To run the test suite first invoke the following command within the repo, installing the development dependencies:
108
109 $ npm install
110
111 then run the tests:
112
113 $ make test
114
5b1235a @tj replaced short contrib list with git-summary(1) output
tj authored
115 ## Contributors
116
117 ```
118 project: express
119 commits: 3410
120 files : 230
121 authors:
122 1883 Tj Holowaychuk 55.2%
123 1285 visionmedia 37.7%
124 72 TJ Holowaychuk 2.1%
125 54 Aaron Heckmann 1.6%
126 34 csausdev 1.0%
127 26 ciaranj 0.8%
128 6 Guillermo Rauch 0.2%
129 3 Dav Glass 0.1%
130 3 Nick Poulden 0.1%
131 2 Jake Gordon 0.1%
132 2 Ben Weaver 0.1%
133 2 Hunter Loftis 0.1%
134 2 Benny Wong 0.1%
135 2 Dave Hoover 0.1%
136 2 Brian McKinney 0.1%
137 2 Daniel Shaw 0.1%
138 1 Masahiro Hayashi 0.0%
139 1 Matt Colyer 0.0%
140 1 Pau Ramon 0.0%
141 1 Peter Rekdal Sunde 0.0%
142 1 Raynos 0.0%
143 1 Roman Shtylman 0.0%
144 1 Teng Siong Ong 0.0%
145 1 Viktor Kelemen 0.0%
146 1 ctide 0.0%
147 1 ewoudj 0.0%
148 1 isaacs 0.0%
149 1 mgutz 0.0%
150 1 pikeas 0.0%
151 1 shuwatto 0.0%
152 1 Justin Lilly 0.0%
153 1 Adam Sanderson 0.0%
154 1 Andrii Kostenko 0.0%
155 1 Arpad Borsos 0.0%
156 1 Ashwin Purohit 0.0%
157 1 Darren Torpey 0.0%
158 1 Greg Ritter 0.0%
159 1 Gregory Ritter 0.0%
160 1 James Herdman 0.0%
161 1 Joe McCann 0.0%
162 1 Jonathan Dumaine 0.0%
163 1 Jonathan Palardy 0.0%
164 1 Jonathan Zacsh 0.0%
165 1 8bitDesigner 0.0%
166 1 Ken Sato 0.0%
167 1 Maciej Małecki 0.0%
168
169 ```
170
fa08323 @tj Markdown
tj authored
171 ## License
8675f12 @tj New doc files
tj authored
172
173 (The MIT License)
174
9914a1e @tj copyright
tj authored
175 Copyright (c) 2009-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
8675f12 @tj New doc files
tj authored
176
177 Permission is hereby granted, free of charge, to any person obtaining
178 a copy of this software and associated documentation files (the
179 'Software'), to deal in the Software without restriction, including
180 without limitation the rights to use, copy, modify, merge, publish,
181 distribute, sublicense, and/or sell copies of the Software, and to
182 permit persons to whom the Software is furnished to do so, subject to
183 the following conditions:
184
185 The above copyright notice and this permission notice shall be
186 included in all copies or substantial portions of the Software.
187
188 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
189 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
190 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
191 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
192 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
193 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
4858502 @nomiddlename Asynchronous handlers working.
nomiddlename authored
194 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.