584 Commits

Author SHA1 Message Date
Dmitriy
24fce9deb3 examples: fixes to mvc example
closes #2534
2015-02-18 23:03:24 -05:00
Douglas Christopher Wilson
4aa2801054 Merge tag '3.18.6' 2014-12-12 22:06:21 -05:00
Douglas Christopher Wilson
d23417e6e8 examples: switch examples used in tests to ejs engine 2014-11-29 12:09:00 -05:00
Josemar Magalhaes
6dea32cd18 examples: add multi router example
closes #2434
2014-11-09 19:01:13 -05:00
Douglas Christopher Wilson
b4eaf89186 examples: remove invalid cors example
Not only is the example not even standards-compliant, but it
encourages bad security settings and practices.
2014-11-06 21:14:02 -05:00
Douglas Christopher Wilson
b1d0c19ca1 examples: make main app file names consistent
fixes #2408
2014-10-23 02:39:38 -04:00
Douglas Christopher Wilson
e9539fc780 docs: visionmedia is now tj on Github 2014-10-23 02:20:51 -04:00
Douglas Christopher Wilson
6bc7574ab5 docs: typo fixes
closes #2316
2014-09-08 23:53:21 -04:00
Douglas Christopher Wilson
3dca534995 Merge tag '3.17.1' 2014-09-08 23:48:59 -04:00
Douglas Christopher Wilson
33bb8fc4b6 examples: fix up route-separation code
closes #2341
2014-09-08 20:51:32 -04:00
Douglas Christopher Wilson
b97f6eb506 examples: fix github view example
closes #2344
2014-09-08 19:31:58 -04:00
Douglas Christopher Wilson
9eafaa23d8 Merge tag '3.16.7' 2014-08-18 22:54:25 -04:00
Raymond Feng
d7bef52591 build: move repository
closes #2268
closes #2270
2014-08-18 22:07:35 -04:00
Douglas Christopher Wilson
e8f8ea7e05 docs: update examples for deprecations 2014-08-06 18:13:54 -04:00
Douglas Christopher Wilson
ca306eace1 deps: update example dependencies 2014-07-03 10:49:53 -04:00
Carlos Souza
83bbf0902d examples: tweak cors example
The PUT method needs clearance from the server, unlike GET, HEAD
and POST, so this demonstrates a case where the method in the
response is important.

closes #2195
2014-06-23 13:37:30 -04:00
Douglas Christopher Wilson
7d6208e0af deps: connect@2.21.0 2014-06-21 21:09:10 -04:00
刘星
e606d99dc8 Fix res.attachment Unicode filenames in Safari
closes #2188
2014-06-20 16:55:05 -04:00
Douglas Christopher Wilson
6ee9433f29 deps: update example dependencies 2014-06-20 16:43:04 -04:00
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