Comparar commits
52 Commits
3.0.0beta3
...
1.0.2
| Autor | SHA1 | Data | |
|---|---|---|---|
| 52353da08b | |||
| dc56b9b603 | |||
| 1446135545 | |||
| cdc46307d7 | |||
| dbf02c231a | |||
| 4732185e6f | |||
| 84a95b3101 | |||
| 09e8fe280b | |||
| 0e4ea9c16b | |||
| c7542aef95 | |||
| 6873bce6c6 | |||
| 6ddacb6302 | |||
| e1d33992a7 | |||
| 569c5139a6 | |||
| 6f5f5787e2 | |||
| 94cf769dd7 | |||
| 6d00b45eed | |||
| 6a4c6933aa | |||
| c35ee2427e | |||
| 3d7216935a | |||
| fc15c3d02b | |||
| 9eaec5b34e | |||
| 30712fa9d9 | |||
| b817579d8a | |||
| cbcaba3cec | |||
| 4e11fef43b | |||
| 067fdd5c4c | |||
| fff815f666 | |||
| 609c18aa5b | |||
| 73c108ce90 | |||
| 1e9da205a7 | |||
| d5539c7beb | |||
| f87bd8c38f | |||
| 05515fa09e | |||
| 35c91ed6f5 | |||
| 26238c429d | |||
| 1b28ad16d4 | |||
| e29f3aa5dd | |||
| 5c94603787 | |||
| 9409107f77 | |||
| 7f11aa25ea | |||
| 1994f24d82 | |||
| b5b30a3f20 | |||
| 4fcbb961eb | |||
| 11cfad755a | |||
| 0b24bd08c9 | |||
| b377839538 | |||
| 698d82f799 | |||
| 462a291eb8 | |||
| 79dc2467f7 | |||
| 0a0c86813d | |||
| dfdc939816 |
@@ -1,4 +1,17 @@
|
||||
|
||||
1.0.2 / 2011-01-10
|
||||
==================
|
||||
|
||||
* Removed nested require, using `connect.router`
|
||||
|
||||
1.0.1 / 2010-12-29
|
||||
==================
|
||||
|
||||
* Fixed for middleware stacked via `createServer()`
|
||||
previously the `foo` middleware passed to `createServer(foo)`
|
||||
would not have access to Express methods such as `res.send()`
|
||||
or props like `req.query` etc.
|
||||
|
||||
1.0.0 / 2010-11-16
|
||||
==================
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ The following are the major contributors of Express (in no specific order).
|
||||
|
||||
The latest release of Express is compatible with node --version:
|
||||
|
||||
v0.2.4
|
||||
v0.2.5
|
||||
|
||||
and connect --version:
|
||||
|
||||
|
||||
+4
-3
@@ -12,7 +12,7 @@ var fs = require('fs')
|
||||
* Framework version.
|
||||
*/
|
||||
|
||||
var version = '1.0.0';
|
||||
var version = '1.0.2';
|
||||
|
||||
/**
|
||||
* stdin stream.
|
||||
@@ -145,10 +145,11 @@ var appTest = [
|
||||
, " * Module dependencies."
|
||||
, " */"
|
||||
, ""
|
||||
, "var app = require('../app');"
|
||||
, "var app = require('../app')"
|
||||
, " , assert = require('assert');"
|
||||
, "",
|
||||
, "module.exports = {"
|
||||
, " 'GET /': function(assert){"
|
||||
, " 'GET /': function(){"
|
||||
, " assert.response(app,"
|
||||
, " { url: '/' },"
|
||||
, " { status: 200, headers: { 'Content-Type': 'text/html; charset=utf-8' }},"
|
||||
|
||||
+15
-13
@@ -36,19 +36,21 @@ Note the use of _app.router_, which can (optionally) be used to mount the applic
|
||||
otherwise the first call to _app.{get,put,del,post}()_ will mount the routes.
|
||||
|
||||
app.configure(function(){
|
||||
app.use(express.methodOverride());
|
||||
app.use(express.bodyDecoder());
|
||||
app.use(app.router);
|
||||
app.use(express.staticProvider(__dirname + '/public'));
|
||||
});
|
||||
|
||||
app.configure('development', function(){
|
||||
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
|
||||
});
|
||||
|
||||
app.configure('production', function(){
|
||||
app.use(express.errorHandler());
|
||||
});
|
||||
app.use(express.methodOverride());
|
||||
app.use(express.bodyDecoder());
|
||||
app.use(app.router);
|
||||
});
|
||||
|
||||
app.configure('development', function(){
|
||||
app.use(express.staticProvider(__dirname + '/public'));
|
||||
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
|
||||
});
|
||||
|
||||
app.configure('production', function(){
|
||||
var oneYear = 31557600000;
|
||||
app.use(express.staticProvider({ root: __dirname + '/public', maxAge: oneYear }));
|
||||
app.use(express.errorHandler());
|
||||
});
|
||||
|
||||
For internal and arbitrary settings Express provides the _set(key[, val])_, _enable(key)_, _disable(key)_ methods:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ var exports = module.exports = require('connect').middleware;
|
||||
* Framework version.
|
||||
*/
|
||||
|
||||
exports.version = '1.0.0';
|
||||
exports.version = '1.0.2';
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
|
||||
@@ -14,7 +14,7 @@ var url = require('url')
|
||||
, connect = require('connect')
|
||||
, utils = connect.utils
|
||||
, queryString = require('querystring')
|
||||
, router = require('connect/middleware/router');
|
||||
, router = require('connect').router;
|
||||
|
||||
/**
|
||||
* Initialize a new `Server` with optional `middleware`.
|
||||
@@ -32,7 +32,7 @@ var Server = exports = module.exports = function Server(middleware){
|
||||
this.viewHelpers = {};
|
||||
this.dynamicViewHelpers = {};
|
||||
this.errorHandlers = [];
|
||||
connect.Server.call(this, middleware || []);
|
||||
connect.Server.call(this, []);
|
||||
|
||||
// Default "home" to /
|
||||
this.set('home', '/');
|
||||
@@ -65,6 +65,13 @@ var Server = exports = module.exports = function Server(middleware){
|
||||
next();
|
||||
});
|
||||
|
||||
// Apply middleware
|
||||
if (middleware) {
|
||||
middleware.forEach(function(fn){
|
||||
self.use(fn);
|
||||
});
|
||||
}
|
||||
|
||||
// Use router, expose as app.get(), etc
|
||||
var fn = router(function(app){ self.routes = app; });
|
||||
this.__defineGetter__('router', function(){
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "express",
|
||||
"description": "Sinatra inspired web development framework",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
||||
"contributors": [
|
||||
{ "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" },
|
||||
|
||||
+1
-1
Submodule support/connect updated: 434fe8ad88...08f4d99503
+1
-1
Submodule support/expresso updated: c0a9e3005b...7f10ab7fa6
+1
-1
Submodule support/jade updated: c0f5c347ae...3ad6e6a61d
Referência em uma Nova Issue
Bloquear um usuário