Readme
This file
Path
Readme
89 lines · 2.3 KiB
Last changed by
Docsvisionmediabefore adoption05ea7a5
History of this fileTake it
New doc filesvisionmediabefore adoption8675f12
lines 1–20why, one step back12= Express34 Insanely fast (and small) server-side JavaScript web development framework5 built on node.js and the V8 JavaScript engine.67 * Stay tuned, coming soon :)89== Features (so far)1011 * Sexy DSL12 * Mime helpers13 * Nested parameter parsing14 * Full test coverage15 * Test helpers (mock requests etc)16 * Cookie support17 * Session support18 * Faux method support for RESTful apps19 * Extendable using Express 'Modules'20 * Static file servingDocsvisionmediabefore adoption05ea7a5
line 21why, one step back21 * View supportNew doc filesvisionmediabefore adoption8675f12
lines 22–89why, one step back22 * Non polluting so you can use it with your fav JavaScript libraries :)23 * Routing24 * string matching 25 * regexp with captures 26 * param key substitution27 * pre-conditions28 * overidding29 * etc3031== Examples3233 // GET /user/tj/edit34 35 get('user/:name/:operation', function(){36 param('operation') + 'ing ' + param('name')37 })3839 // GET /articles40 41 get('articles', function(){42 'list of articles'43 })4445 // GET /articles/1246 47 get(/articles\/(\d+)/, function(){48 'article id ' + captures[1]49 })50 51 // POST /user/:id52 53 post('user/:id', function(){54 User.destroy(params('id')) ? 55 'User deleted' :56 'Failed to delete user'57 })58 59== Headers6061 get ('foo', function(){62 header('Content-Type', 'text/html')63 '<p>bar</p>'64 })6566== License 6768(The MIT License)6970Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>7172Permission is hereby granted, free of charge, to any person obtaining73a copy of this software and associated documentation files (the74'Software'), to deal in the Software without restriction, including75without limitation the rights to use, copy, modify, merge, publish,76distribute, sublicense, and/or sell copies of the Software, and to77permit persons to whom the Software is furnished to do so, subject to78the following conditions:7980The above copyright notice and this permission notice shall be81included in all copies or substantial portions of the Software.8283THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,84EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF85MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.86IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY87CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,88TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE89SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.