Commit Graph

665 Commits

Author SHA1 Message Date
Douglas Christopher Wilson
5a4e9125de deps: connect@2.20.2 2014-06-19 23:24:07 -04:00
Douglas Christopher Wilson
3205f68510 deps: update example dependencies 2014-06-09 20:39:34 -04:00
Joshua Goldberg
ad05eb8222 Fix typo in console.log in multipart example
closes #2164
2014-06-07 20:14:33 -04:00
Douglas Christopher Wilson
4279e6ef45 improve before hook in mvc example 2014-06-06 10:42:29 -04:00
Douglas Christopher Wilson
3db6dd752f change confusing 404 handling in download example 2014-06-06 10:23:47 -04:00
Douglas Christopher Wilson
9e5a758e7c deps: update example dependencies 2014-06-02 20:59:45 -04:00
Douglas Christopher Wilson
db4448dda8 Merge tag '3.9.0' 2014-05-30 22:17:51 -04:00
Douglas Christopher Wilson
1f2e00ef8d deps: should@~4.0.0 2014-05-29 22:53:59 -04:00
Douglas Christopher Wilson
ad9a414fae tests: add more acceptance tests 2014-05-28 00:24:24 -04:00
Douglas Christopher Wilson
c18c2a8e68 tests: exclude untestable lines in examples from coverage 2014-05-28 00:07:27 -04:00
Douglas Christopher Wilson
602e5a8200 tests: add more tests of mvc example 2014-05-20 23:41:09 -04:00
Douglas Christopher Wilson
097cd0c242 Merge tag '3.7.0' 2014-05-18 11:21:30 -04:00
Douglas Christopher Wilson
35c50601bd Merge tag '3.6.0' 2014-05-09 17:33:26 -04:00
Douglas Christopher Wilson
3d6b4ba013 update example dependencies 2014-05-08 22:08:49 -04:00
Douglas Christopher Wilson
0461e55380 deprecate app.del
closes #2095
2014-05-08 19:16:25 -04:00
Douglas Christopher Wilson
374e6c3789 fix multipart example
closes #2061
2014-04-24 17:50:20 -04:00
Fernando Silveira
ce17efd95b MVC example: EJS -> Jade. 2014-04-23 00:13:26 -03:00
Roman Shtylman
5480cb9571 Merge pull request #2060 from swrh/master
examples: Fix bugs in MVC example
2014-04-22 23:09:49 -04:00
Fernando Silveira
b38ffd7376 Fixing bug in MVC example pet view. 2014-04-22 23:30:17 -03:00
Fernando Silveira
896609c859 Fixing bug when updating pet name in MVC example. 2014-04-21 12:10:21 -03:00
Fernando Silveira
50158b851c Express 4 now uses "method-override" external library. 2014-04-21 12:08:34 -03:00
Andy VanWagoner
56b672e657 support non-ascii filenames in content-disposition headers 2014-04-19 21:16:11 -06:00
WON JONG YOO
dd8e279cac Not work..
This example does not work with express 4.x.
bodyParser() does not have multipart() anymore.
Multiparty module and middleware are added.
2014-03-31 16:52:22 -04:00
agchou
06dcb22ae2 clean up code consistency 2014-03-27 09:15:27 -07:00
Roman Shtylman
3ea3250dbe examples: remove reference to app.router in static-files
closes #1974
2014-03-12 10:27:10 -04:00
Roman Shtylman
f1315b9efa fix examples for express 4 (separate middleware)
close #1947
2014-03-05 10:36:05 -05:00
Timo Sand
0fbfce58c6 Fixed deprecated example doctype 2014-03-01 12:32:42 +02:00
Roman Shtylman
1396e0855d remove last pieces of connect dependency
- copy over patch.js to shim ServerResponse
- bundle `static` middleware
2014-02-22 09:26:29 -05:00
Roman Shtylman
f41d09a3cf remove app.router and refactor middleware processing
This is an overhaul of middleware processing, Router and Route. Connect is no
longer used to process the middleware stack. This functionality has been
split into two parts: middleware stack and default error response.

The entry point for request processing is the `app.handle` method. It
sets up the default error response handle (to run in the event of no
other error handler) and then triggers the app router (instance of
Router) to handle the request.

The app router `handle` function contains the middleware dispatch layer
previously in the connect codebase. This layer handle the logic for
dispatching `.use` calls (stripping paths if needed). The app contains a
base router `app._router`. New routes can be created and `.use`d on this
router to organize routes into files.

Routers now have the following methods `.use`, `.all`, `.param` which
are all public.

Additionally, Routers have a `.route(path)` method which returns a new
instance of Route for the requested path. Route(s) are isolated
middleware stacks and contain methods for the HTTP verbs as well as an
`.all` method to act similar to middleware. These methods are chainable
to easily describe requirements for a route.

  var route = Router.route('/foo'); // or 'app.route('/foo')'

  route
  .all(auth)
  .get(function(...) {})
  .all(more_checks)
  .post(function(...) {})

Any Route and Router methods which accept handlers also accept error
(arity 4) handlers which will also behave as expected.

Finally, the `app.router` getter has been removed. Middleware and
handlers are run IN THE ORDER they are seen in the file. This means that
code which injected the `app.router` and then added error handlers (or
other middleware) will need to be updated to move those handlers after
any requests added on the app object. The examples have been updated
accordingly. This is the largest breaking change to codebases in this
commit.
2014-02-03 15:59:52 -05:00
Matheus Azzi
e465624fd0 Update layout.jade 2014-01-13 20:45:50 -08:00
Matheus Azzi
38996b30b1 Update layout.jade 2014-01-05 01:14:38 -02:00
yosssi
00a3b01f39 Changed doctype 5 to doctype html on the example file because the former was deprecated on Jade version 1.0.0. 2013-12-23 22:13:05 +09:00
TJ Holowaychuk
edd39fb194 fix weird variable name in example 2013-11-26 23:39:35 -08:00
TJ Holowaychuk
a71d264d45 fix weird variable name in example 2013-11-26 23:39:08 -08:00
Rick Yakubowski
1684a8792a Removed Buffer call with 'binary' encoding option in auth example.
According to the Node.js documentation for Buffer objects regarding the
'binary' encoding option:

"This encoding method is deprecated and should be avoided in favor of
Buffer objects where possible. This encoding will be removed in future
versions of Node."

Simply calling toString() with a 'base64' argument on the hash seems to
accomplish the same thing; this makes the code compatible with current
documentation as well as being a bit easier to follow.
2013-11-21 14:01:56 -05:00
Jonathan Ong
b66c7da05f Merge pull request #1659 from dresende/patch-1
Fixes typo in index.js vhost example
2013-09-07 21:43:45 -07:00
Atharva
058d7ec2ea Improved variable names and updated comments for better clarity of example 2013-08-24 16:44:44 +05:30
Diogo Resende
7a31a1d311 Fixes typo in index.js vhost example 2013-06-23 23:23:58 +02:00
TJ Holowaychuk
545dca6c4d Merge pull request #1642 from jade-bot/master
Update jade files [bot-update#1]
2013-06-02 16:04:50 -07:00
jade-bot
cd31cecfd1 Update to maintain compatability with the latest version of jade 2013-05-26 14:51:34 -07:00
joshlangner
fd73bd006e added some additional explanation for clarity 2013-05-19 22:47:04 -04:00
TJ Holowaychuk
c805d80a9b Merge pull request #1592 from bartsqueezy/eb1bbb9
Removing dependency which is no longer supported
2013-05-11 15:36:39 -07:00
Patrick Williams
91835e6816 Flush messages exposed to locals after the view has the chance to process them. 2013-05-10 09:05:37 -06:00
colynb
69453ff889 the file is hosts not vhosts 2013-05-01 16:27:29 -07:00
Steve Bartnesky
5fa685b602 removing github-flavored-markdown as a dependency as it is no longer supported. switch to use marked instead 2013-04-29 09:12:29 -05:00
Steve Bartnesky
eb1bbb92c0 removing github-flavored-markdown as a dependency as it is no longer supported. switch to use marked instead 2013-04-29 08:59:52 -05:00
TJ Holowaychuk
579857cfaa fix example port 2013-04-13 10:14:23 -07:00
Caridy Patino
0b4e2df480 add "view" constructor setting to override view behaviour 2013-04-13 09:53:50 -07:00
Josh Lubawy
ee9d50c128 Modified hash to return base64 encoded strings. 2013-04-04 23:26:27 -07:00
TJ Holowaychuk
bb29da5980 refactor vhost example 2013-01-13 11:32:53 -08:00
TJ Holowaychuk
c70db96b06 Update examples/cors/index.js 2012-11-08 13:52:20 -08:00
TJ Holowaychuk
4283f38698 add OPTIONS to cors example. Closes #1398 2012-11-04 13:21:55 -08:00
TJ Holowaychuk
44d0625e91 fix view-locals example. Closes #1370
this was from 2x, doesnt need to be there at all
2012-10-15 16:07:56 -07:00
TJ Holowaychuk
c2fa6cc94d fix route-separation example 2012-10-09 19:31:52 -07:00
TJ Holowaychuk
464608025b refactor ejs example some more 2012-10-09 19:26:55 -07:00
TJ Holowaychuk
d653d2308b refactor ejs example 2012-10-09 19:26:17 -07:00
TJ Holowaychuk
a52b1f121c add EJS title example to auth 2012-10-09 19:21:50 -07:00
TJ Holowaychuk
9edd8be520 remove user footer info from auth example
looks a little weird
2012-10-09 19:20:30 -07:00
TJ Holowaychuk
aa1d47600a fix auth example acceptance tests 2012-10-09 19:19:54 -07:00
sakateka
be7ec8b40e improved ejs Example 2012-10-09 19:16:54 -07:00
sakateka
8e12dd9c17 Checked all the examples 2012-10-09 19:16:54 -07:00
sakateka
92840b9f68 Fixed: notify of a successful auth. 2012-10-05 12:23:11 +04:00
TJ Holowaychuk
315e79e9f0 add redis search example 2012-09-18 09:31:12 -07:00
TJ Holowaychuk
2c174d6b3b add app.router to static-files example 2012-09-03 08:54:39 -07:00
TJ Holowaychuk
60ee465bf7 add static-files example
point people here if they have
problems with serving static files
2012-09-03 08:52:53 -07:00
TJ Holowaychuk
3c5ad753b6 add "verbose errors" option to error-pages example 2012-08-29 10:46:52 -07:00
nickjj
1b15af713c fix error-pages 404 status 2012-08-29 14:31:13 -03:00
TJ Holowaychuk
f7c1c638bb add some comments to error-pages example 2012-08-28 10:28:58 -07:00
TJ Holowaychuk
500c8ab4b3 docs 2012-08-14 04:14:37 -07:00
TJ Holowaychuk
c4ad97d555 add redis online user activity tracking example 2012-08-14 04:13:55 -07:00
TJ Holowaychuk
ff1c6f0cfa rename multipart app.js to index.js 2012-08-09 20:08:03 -07:00
TJ Holowaychuk
3923ec89f7 remove route-loading example
using vm for this is lame
2012-08-09 10:15:12 -07:00
TJ Holowaychuk
48923055eb docs 2012-08-01 13:18:30 -07:00
TJ Holowaychuk
0f20a5e06a add CORS example 2012-08-01 13:17:46 -07:00
Jan Buschtöns
73ce9d028c Line 40 removed. Fixed! 2012-07-26 21:46:22 +02:00
TJ Holowaychuk
5f33d89ea5 fix vhost example 2012-07-24 15:41:12 -07:00
TJ Holowaychuk
42fd29efe8 deprecate .createServer() & remove old stale examples 2012-07-24 15:40:05 -07:00
TJ Holowaychuk
54d37c60f5 add more examples to view-locals 2012-07-18 10:41:07 -07:00
TJ Holowaychuk
ab61837885 change res.sendfile() to use send() module 2012-07-13 08:58:40 -07:00
TJ Holowaychuk
5415c98ff9 add route-map tests 2012-06-30 12:18:32 -07:00
TJ Holowaychuk
39efa452fc Added route-map example 2012-06-29 09:01:06 -07:00
TJ Holowaychuk
bddcdee3fe docs 2012-06-27 13:58:35 -07:00
TJ Holowaychuk
26fab2a27d update auth example to utilize cores pbkdf2 2012-06-27 13:20:39 -07:00
TJ Holowaychuk
f25aaf11e9 Added another example to content-negotiation 2012-06-13 17:32:44 -07:00
TJ Holowaychuk
9ed1f2a446 Removed blog example
need a better one
2012-05-07 12:52:56 -07:00
TJ Holowaychuk
833a4873a4 misc refactor of blog example 2012-05-07 12:44:03 -07:00
TJ Holowaychuk
503c45840f ws 2012-05-03 09:35:27 -07:00
TJ Holowaychuk
6f102ff40f Added view-locals example 2012-05-03 09:35:14 -07:00
TJ Holowaychuk
a58e3deac2 Added conditional-GET support to res.send() 2012-04-27 10:44:39 -07:00
TJ Holowaychuk
9719b58575 error/index.js 2012-04-26 04:57:28 -07:00
TJ Holowaychuk
13c18fa363 clean up error example 2012-04-26 04:56:23 -07:00
TJ Holowaychuk
c17ad6ef65 error-pages/index.js 2012-04-26 04:55:24 -07:00
TJ Holowaychuk
2cd1783613 fixed hello-world 2012-04-26 04:53:56 -07:00
TJ Holowaychuk
06db11cd61 removed old form example 2012-04-26 04:51:48 -07:00
TJ Holowaychuk
125421ec45 removed old github example 2012-04-26 04:51:25 -07:00
TJ Holowaychuk
cc84f40d61 misc 2012-04-26 04:46:37 -07:00
TJ Holowaychuk
30167356f2 less verbose example apps when testing 2012-04-26 04:40:04 -07:00
TJ Holowaychuk
50f43462ae logger for mvc 2012-04-26 04:32:25 -07:00
TJ Holowaychuk
bd2a972dba fixed mvc example 404 2012-04-26 04:28:29 -07:00
TJ Holowaychuk
3c162ae030 implement "before" middleware for mvc example 2012-04-26 04:23:21 -07:00
TJ Holowaychuk
fa746cc027 added 404 and 5xx pages to mvc example 2012-04-26 04:08:58 -07:00
TJ Holowaychuk
1e85178c73 started mvc acceptance tests 2012-04-26 04:02:14 -07:00
TJ Holowaychuk
d0bc0ad2ca Added new mvc example 2012-04-26 03:53:49 -07:00
TJ Holowaychuk
2a951e961b Merge pull request #1106 from benedmunds/master
Fixed reference to this.body.length in Post validation error when the body length is less than 10 characters
2012-04-25 10:49:58 -07:00
TJ Holowaychuk
42aeab500b Fixed redis session example 2012-04-25 10:30:56 -07:00
TJ Holowaychuk
808a8a314a Fixed session example. Closes #1105 2012-04-25 10:29:15 -07:00
Ben Edmunds
d8caf209e3 Fixed reference to this.body.length in Post validation error when the body length is less than 10 characters. 2012-04-24 15:05:17 -04:00
TJ Holowaychuk
97808383ed Added client-side data exposing example 2012-04-19 16:03:22 -07:00
TJ Holowaychuk
e3f6faa350 removed layout-control example
no longer applies
2012-04-17 20:38:52 -07:00
TJ Holowaychuk
cc69d50c60 remove mvc example
too large to actually be helpful... and annoying
to maintain :)
2012-04-17 20:37:55 -07:00
TJ Holowaychuk
ebabce9982 Fixed route-loading example 2012-04-17 20:26:09 -07:00
TJ Holowaychuk
037d3490ca removed format example 2012-04-17 20:21:05 -07:00
TJ Holowaychuk
ba7bcbb0d6 Fixed cookie-sessions example 2012-04-17 20:20:39 -07:00
TJ Holowaychuk
5dcc4f46db Fixed jade example 2012-04-17 20:15:17 -07:00
TJ Holowaychuk
05253272cb clarify ejs example 2012-04-13 09:16:16 -07:00
TJ Holowaychuk
aa4ec8f3e2 fixed glob example 2012-04-11 13:56:08 -07:00
TJ Holowaychuk
7048be2830 refactoring auth example 2012-04-11 11:17:12 -07:00
TJ Holowaychuk
acc0e934cb ocd 2012-04-02 20:13:50 -07:00
TJ Holowaychuk
1d485840fd ocd 2012-04-02 20:13:31 -07:00
TJ Holowaychuk
dcb147608a ocd 2012-04-02 20:01:13 -07:00
TJ Holowaychuk
ddf24d1fd6 fixed markdown example 2012-04-02 20:00:53 -07:00
TJ Holowaychuk
d396761f76 refactored cookie-sessions example 2012-03-23 18:22:30 -07:00
TJ Holowaychuk
711519361c fixed content-negotiation example 2012-03-23 18:11:12 -07:00
TJ Holowaychuk
a21435cb05 updated content-negotiation example 2012-02-18 17:37:47 -08:00
TJ Holowaychuk
80e16c8ca3 tweak multipart example 2012-02-18 14:14:09 -08:00
TJ Holowaychuk
73caacbd42 mounting sucks, removing this example 2012-02-18 14:06:41 -08:00
TJ Holowaychuk
b75bb003bd fixed markdown example 2012-02-18 13:54:36 -08:00
TJ Holowaychuk
6c2194fdb4 smaller hello world 2012-02-18 13:52:31 -08:00
TJ Holowaychuk
da61d8b639 fixed github example 2012-02-18 13:52:02 -08:00
TJ Holowaychuk
863ba199f6 stack is always shown 2012-02-18 13:49:08 -08:00
TJ Holowaychuk
161ebb354f removed old flash example 2012-02-18 13:48:32 -08:00
TJ Holowaychuk
1516ebf7f9 misc 2012-02-18 13:46:22 -08:00
TJ Holowaychuk
2820f2227d fixing downloads example 2012-02-18 13:45:44 -08:00
TJ Holowaychuk
a078f5f5c1 docs 2012-02-18 13:41:44 -08:00
TJ Holowaychuk
d0a83053d3 fixed up blog example messages 2012-02-18 13:41:10 -08:00
TJ Holowaychuk
b6bc01abde fixing blog example 2012-02-18 13:28:56 -08:00
TJ Holowaychuk
196a1eb6ad set view engine for auth app 2012-02-18 13:20:23 -08:00
TJ Holowaychuk
593271f536 removed accessLogger from auth example 2012-02-18 13:18:00 -08:00
TJ Holowaychuk
0f24f715ba tweak auth example 2012-02-18 13:16:17 -08:00
Robert Sköld
8120a06cd6 Updated resource example with acceptnce test. 2012-02-18 13:08:26 -08:00
Robert Sköld
a153082120 Updated params example with acceptance test. 2012-02-18 13:08:26 -08:00
Robert Sköld
970031e267 Updated multipart example with acceptance test. 2012-02-18 13:08:26 -08:00
Robert Sköld
a819856f3f Updated mounting example with acceptance test. 2012-02-18 13:08:26 -08:00
Robert Sköld
4dbaaa2855 Updated markdown example with acceptance test. 2012-02-18 13:08:26 -08:00
Robert Sköld
0593cf4379 Updated helloworld example with acceptance test. 2012-02-18 13:08:26 -08:00
Robert Sköld
cd0e5dbb4c Updated format example with acceptance test. 2012-02-18 13:08:26 -08:00
Robert Sköld
7cb1c3cabb Updated form example for 3.x (not working as it relies on req.flash()) 2012-02-18 13:08:26 -08:00
Robert Sköld
550b9101b8 Updated error-pages example with acceptance test. 2012-02-18 13:08:26 -08:00
Robert Sköld
9d9564568b Updated error example with acceptance tests. 2012-02-18 13:08:26 -08:00
Robert Sköld
7ea7a53e7c Updated downloads example with acceptance tests. 2012-02-18 13:08:25 -08:00