Commit Graph

665 Commits

Author SHA1 Message Date
Owen Luke
60f87f8074 examples: fix posts link in route-separation example
closes #3310
2017-05-17 21:17:16 -04:00
Owen Luke
fde8f647d3 examples: fix route in params example
closes #3310
2017-05-17 21:14:47 -04:00
Jamie Barton
3763d73a1f examples: replace jade with hbs in mvc example
fixes #3181
closes #3185
closes #3243
closes #3245
closes #3249
2017-03-23 00:45:23 -04:00
Jamie Barton
245fa8942a examples: replace jade with ejs in route-separation
closes #3241
2017-03-17 00:09:50 -04:00
Jamie Barton
f44368f8be examples: replace jade with ejs in view-locals
closes #3240
2017-03-09 23:41:15 -05:00
Douglas Christopher Wilson
e5dbb0cb4e Merge tag '4.15.2' 2017-03-06 08:40:02 -05:00
Jamie Barton
57d3dfd9f8 examples: merge the jade example into ejs
closes #3223
2017-03-05 23:13:53 -05:00
chainhelen
8eb95ae579 examples: use path.join instead of concatenation
closes #3236
2017-03-05 23:07:24 -05:00
Jamie Barton
4012846d25 examples: use static assets in search example
closes #3224
2017-03-01 18:22:36 -05:00
Douglas Christopher Wilson
501e24e0a9 Merge tag '4.15.0' 2017-03-01 18:17:04 -05:00
Douglas Christopher Wilson
7ef92f8a17 examples: remove semi-broken expose-data-to-client example 2017-02-16 00:42:57 -05:00
Douglas Christopher Wilson
034f261fea examples: use pbkdf2-password module in auth example
closes #3207
2017-02-15 23:36:17 -05:00
Tom Hosford
4f291e7d55 examples: use res.format in error-pages
closes #3195
2017-02-04 20:48:12 -05:00
Douglas Christopher Wilson
bcbb9d56c5 Merge tag '4.14.1' 2017-01-28 21:02:36 -05:00
Douglas Christopher Wilson
c238aca438 examples: remove big-view example 2017-01-26 22:48:08 -05:00
Douglas Christopher Wilson
6b506d801a examples: fix mvc example to ignore files in controllers dir
fixes #3182
2017-01-26 22:33:52 -05:00
Hamza
305f982bd7 exapmples: use path.join to concat paths
closes #3046
2016-07-31 22:14:05 +10:00
Douglas Christopher Wilson
1dbfee6623 Merge tag '4.14.0' 2016-06-20 00:37:34 -04:00
Douglas Christopher Wilson
e3dd191d54 examples: escape HTML in markdown example 2016-05-23 23:00:43 -04:00
Muhammad Saqib
dd2b897774 examples: comment the usage of process.nextTick
closes #2903
closes #2908
2016-02-24 21:58:50 -05:00
Douglas Christopher Wilson
7cafdb5824 Merge tag '4.13.4' 2016-01-21 21:23:07 -05:00
Douglas Christopher Wilson
e7a02f6a25 build: move repository to expressjs 2016-01-21 20:59:53 -05:00
Douglas Christopher Wilson
f90e045334 Merge tag '4.12.4' 2015-05-18 00:41:42 -04:00
Douglas Christopher Wilson
62d5c38575 Merge tag '3.20.3' 2015-05-18 00:12:01 -04:00
Douglas Christopher Wilson
7df8fa3be5 deps: supertest@1.0.1 2015-05-17 23:44:09 -04:00
Douglas Christopher Wilson
ab3e7b2465 examples: remove problematic file from download example
closes #2393
2015-04-11 09:54:09 -04:00
Alex Dixon
bbcc1e1f52 examples: fix route-separation example's dev logger
closes #2599
2015-03-19 22:35:49 -04:00
Yang Wang
01e059ca74 examples: add missing cookie-session module
fixes #2589
2015-03-17 01:45:03 -04:00
Douglas Christopher Wilson
f6ec710534 Merge tag '4.12.0' 2015-02-23 01:00:12 -05:00
Dmitriy
24fce9deb3 examples: fixes to mvc example
closes #2534
2015-02-18 23:03:24 -05:00
Douglas Christopher Wilson
8a5ecd3d89 Merge tag '4.11.1' 2015-01-21 03:58:41 -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
97ccc52207 Remove res.send(status) signature 2014-11-06 21:20:46 -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
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