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 Holowaychuk New doc files
tj authored
1
bf03e85 TJ Holowaychuk No more ASCII art
tj authored
2 # Express
3
8675f12 TJ Holowaychuk New doc files
tj authored
4 Insanely fast (and small) server-side JavaScript web development framework
a2e93eb TJ Holowaychuk Fixed Connect links
tj authored
5 built on [node](http://nodejs.org) and [Connect](http://github.com/senchalabs/connect).
1f12c53 TJ Holowaychuk Added Connect port notice
tj authored
6
1f9f47f TJ Holowaychuk Readme
tj authored
7 var app = express.createServer();
afd2b4b TJ Holowaychuk Removed alternate installation methods (use git, tarball, or npm)
tj authored
8
1f9f47f TJ Holowaychuk Readme
tj authored
9 app.get('/', function(req, res){
4f4987e TJ Holowaychuk misc
tj authored
10 res.send('Hello World');
1f9f47f TJ Holowaychuk Readme
tj authored
11 });
afd2b4b TJ Holowaychuk Removed alternate installation methods (use git, tarball, or npm)
tj authored
12
13 app.listen(3000);
3d41c61 TJ Holowaychuk Updated docs
tj authored
14
63d02f1 TJ Holowaychuk Install docs
tj authored
15 ## Installation
16
17 $ npm install express
18
0cb8668 TJ Holowaychuk 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 Holowaychuk added quick start to guide
tj authored
23 ## Quick Start
c3fbd3f TJ Holowaychuk 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 Holowaychuk Updated docs
tj authored
40 ## Features
8675f12 TJ Holowaychuk New doc files
tj authored
41
1f9f47f TJ Holowaychuk Readme
tj authored
42 * Robust routing
54d36f3 TJ Holowaychuk Removed traces of connect.redirect()
tj authored
43 * Redirection helpers
7eb088b TJ Holowaychuk Added app.helpers() docs
tj authored
44 * Dynamic view helpers
2294f23 TJ Holowaychuk Fixed connect links
tj authored
45 * Content negotiation
1f9f47f TJ Holowaychuk Readme
tj authored
46 * Focus on high performance
47 * View rendering and partials support
2732d2b TJ Holowaychuk Updated docs
tj authored
48 * Environment based configuration
1f9f47f TJ Holowaychuk Readme
tj authored
49 * Session based flash notifications
2294f23 TJ Holowaychuk Fixed connect links
tj authored
50 * Built on [Connect](http://github.com/senchalabs/connect)
a8865a5 TJ Holowaychuk Misc docs
tj authored
51 * High test coverage
5e4d672 TJ Holowaychuk Executable docs
tj authored
52 * Executable for generating applications quickly
4d98552 TJ Holowaychuk Docs for "view options"
tj authored
53 * Application level view options
2732d2b TJ Holowaychuk Updated docs
tj authored
54
55 Via Connect:
56
327d5b0 TJ Holowaychuk Readme
tj authored
57 * Session support
088aa83 TJ Holowaychuk Updated feature list
tj authored
58 * Cache API
8675f12 TJ Holowaychuk New doc files
tj authored
59 * Mime helpers
8b6c4d3 TJ Holowaychuk Updated history
tj authored
60 * ETag support
2732d2b TJ Holowaychuk Updated docs
tj authored
61 * Persistent flash notifications
bd6f24f Aaron Heckmann add cookie support to readme
aheckmann authored
62 * Cookie support
2732d2b TJ Holowaychuk Updated docs
tj authored
63 * JSON-RPC
64 * Logging
65 * and _much_ more!
bbb858e TJ Holowaychuk Added install section in readme
tj authored
66
1f9f47f TJ Holowaychuk Readme
tj authored
67 ## Contributors
0c82752 TJ Holowaychuk Added npm install docs
tj authored
68
1f9f47f TJ Holowaychuk Readme
tj authored
69 The following are the major contributors of Express (in no specific order).
0c82752 TJ Holowaychuk Added npm install docs
tj authored
70
1f9f47f TJ Holowaychuk 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 Holowaychuk Added Guillermo Rauch to the contributor list
tj authored
74 * Guillermo Rauch ([guille](http://github.com/guille))
0c82752 TJ Holowaychuk Added npm install docs
tj authored
75
1f9f47f TJ Holowaychuk Readme
tj authored
76 ## More Information
e99c279 TJ Holowaychuk Docs
tj authored
77
f0277d3 TJ Holowaychuk #express on freenode
tj authored
78 * #express on freenode
961146a TJ Holowaychuk 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 Holowaychuk added express-resource to readme
tj authored
80 * [express-resource](http://github.com/visionmedia/express-resource) resourceful routing
b122bf2 TJ Holowaychuk link typo
tj authored
81 * [express-configure](http://github.com/visionmedia/express-configuration) async configuration support
6813b48 TJ Holowaychuk 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 Holowaychuk link
tj authored
84 * [express-params](https://github.com/visionmedia/express-params) param pre-condition functions
5b33788 TJ Holowaychuk 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 Holowaychuk 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 Holowaychuk Wiki
tj authored
88 * Visit the [Wiki](http://github.com/visionmedia/express/wiki)
40ccb59 TJ Holowaychuk "Japanese Documentation" in Japanese 日本語ドキュメンテーション :)
tj authored
89 * [日本語ドキュメンテーション](http://hideyukisaito.com/doc/expressjs/) by [hideyukisaito](https://github.com/hideyukisaito)
7eeec91 TJ Holowaychuk russian docs
tj authored
90 * [Русскоязычная документация](http://express-js.ru/)
6c0a416 TJ Holowaychuk Added view partials screencast link
tj authored
91 * Screencast - [Introduction](http://bit.ly/eRYu0O)
92 * Screencast - [View Partials](http://bit.ly/dU13Fx)
adcfd4c TJ Holowaychuk 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 Gareth Jones Added example, extra info to Readme
nomiddlename authored
95
b311118 TJ Holowaychuk Removed testing docs from readme
tj authored
96 ## Node Compatibility
40b3116 TJ Holowaychuk Tasks
tj authored
97
b9e311e TJ Holowaychuk version docs
tj authored
98 Express 1.x is compatible with node 0.2.x and connect < 1.0.
7705042 TJ Holowaychuk docs
tj authored
99
b9e311e TJ Holowaychuk version docs
tj authored
100 Express 2.x is compatible with node 0.4.x and connect 1.x
7eca74a TJ Holowaychuk Updated node --version in readme
tj authored
101
3a04888 TJ Holowaychuk docs
tj authored
102 Express 3.x (_master_ branch) is compatible with node 0.6.x and connect 2.x
103
7aea719 TJ Holowaychuk 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 Holowaychuk prepping blog example for new express
tj authored
108 $ npm install -d
7aea719 TJ Holowaychuk example docs
tj authored
109
110 then run whichever tests you want:
111
112 $ node examples/jade/app.js
113
31a8c7c TJ Holowaychuk 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 Holowaychuk Markdown
tj authored
124 ## License
8675f12 TJ Holowaychuk New doc files
tj authored
125
126 (The MIT License)
127
9914a1e TJ Holowaychuk copyright
tj authored
128 Copyright (c) 2009-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
8675f12 TJ Holowaychuk 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 Gareth Jones 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.