Comparar commits
18 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| d0a8bb550e | |||
| f96f1423e1 | |||
| 7bf17f2f61 | |||
| 670b6cfc15 | |||
| b6d2c8479c | |||
| 5aaa114271 | |||
| e99c2791bb | |||
| 656d7754cd | |||
| 4aaf10fbfc | |||
| 85e77b77aa | |||
| f23ef09247 | |||
| 440d956438 | |||
| acd2852cf3 | |||
| 4246f43bdf | |||
| 7d33769cd2 | |||
| 31fdba80d4 | |||
| 77f8e460d0 | |||
| 51e51db9f7 |
@@ -0,0 +1,12 @@
|
||||
[submodule "lib/support/oo"]
|
||||
path = lib/support/oo
|
||||
url = git://github.com/visionmedia/js-oo.git
|
||||
[submodule "lib/support/ext"]
|
||||
path = lib/support/ext
|
||||
url = git://github.com/visionmedia/ext.js.git
|
||||
[submodule "lib/support/sass"]
|
||||
path = lib/support/sass
|
||||
url = git://github.com/visionmedia/sass.js.git
|
||||
[submodule "lib/support/haml"]
|
||||
path = lib/support/haml
|
||||
url = git://github.com/creationix/haml-js.git
|
||||
@@ -1,4 +1,15 @@
|
||||
|
||||
0.7.2 / 2010-03-16
|
||||
==================
|
||||
|
||||
* Fixed GIT submodules (HAH!)
|
||||
|
||||
0.7.1 / 2010-03-16
|
||||
==================
|
||||
|
||||
* Changed; Express now using submodules again until a PM is adopted
|
||||
* Changed; chat example using millisecond conversions from ext
|
||||
|
||||
0.7.0 / 2010-03-15
|
||||
==================
|
||||
|
||||
|
||||
+20
-6
@@ -28,6 +28,12 @@
|
||||
and run:
|
||||
|
||||
$ kiwi -v install express
|
||||
|
||||
or
|
||||
|
||||
Install via git clone:
|
||||
|
||||
$ git://github.com/visionmedia/express.git && cd express && git submodule update --init
|
||||
|
||||
## Performance
|
||||
|
||||
@@ -40,12 +46,20 @@
|
||||
|
||||
Below is a tiny Express application. View the [Wiki](http://wiki.github.com/visionmedia/express/) for detailed information.
|
||||
|
||||
var kiwi = require('kiwi'),
|
||||
express = kiwi.require('express')
|
||||
|
||||
get('/hello-world', function(){
|
||||
this.contentType('html')
|
||||
return '<h1>Hello World</h1>'
|
||||
require.paths.unshift('express/lib')
|
||||
require('express')
|
||||
|
||||
get('/user', function(){
|
||||
this.redirect('/user/' + this.currentUser.id)
|
||||
})
|
||||
|
||||
get('/user/:id', function(id){
|
||||
this.render('user.haml.html', {
|
||||
locals: {
|
||||
user: this.currentUser,
|
||||
usersOnline: Session.store.length()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
run()
|
||||
|
||||
@@ -8,15 +8,13 @@ var messages = [],
|
||||
kiwi = require('kiwi')
|
||||
|
||||
configure(function(){
|
||||
var fiveMinutes = 300000,
|
||||
oneMinute = 60000
|
||||
kiwi.seed('haml')
|
||||
kiwi.seed('sass')
|
||||
use(MethodOverride)
|
||||
use(ContentLength)
|
||||
use(Cookie)
|
||||
use(Cache, { lifetime: fiveMinutes, reapInterval: oneMinute })
|
||||
use(Session, { lifetime: fiveMinutes, reapInterval: oneMinute })
|
||||
use(Cache, { lifetime: (5).minutes, reapInterval: (1).minute })
|
||||
use(Session, { lifetime: (15).minutes, reapInterval: (1).minute })
|
||||
use(Logger)
|
||||
set('root', __dirname)
|
||||
})
|
||||
|
||||
+5
-3
@@ -1,5 +1,7 @@
|
||||
|
||||
var kiwi = require('kiwi')
|
||||
kiwi.require('oo', '>= 1.2.0')
|
||||
kiwi.require('ext', '>= 0.2.2')
|
||||
require.paths.unshift(__dirname + '/support/ext/lib')
|
||||
require('ext')
|
||||
require('support/oo/lib/oo')
|
||||
require('support/haml/lib/haml')
|
||||
require('support/sass/lib/sass')
|
||||
require('express/core')
|
||||
@@ -314,7 +314,7 @@ Server = Class({
|
||||
// --- Express
|
||||
|
||||
Express = {
|
||||
version: '0.7.0',
|
||||
version: '0.7.2',
|
||||
config: [],
|
||||
routes: [],
|
||||
plugins: [],
|
||||
|
||||
@@ -168,12 +168,9 @@ exports.Session = Plugin.extend({
|
||||
*/
|
||||
|
||||
startReaper: function() {
|
||||
var self = this,
|
||||
oneDay = 86400000,
|
||||
oneHour = 3600000
|
||||
setInterval(function(){
|
||||
self.store.reap(self.lifetime || oneDay)
|
||||
}, self.reapInterval || self.reapEvery || oneHour)
|
||||
this.store.reap(this.lifetime || (1).day)
|
||||
}, this.reapInterval || this.reapEvery || (1).hour, this)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Submódulo
+1
Submodule lib/support/ext added at 967039b7d6
Submódulo
+1
Submodule lib/support/haml added at 389c33c6e4
Submódulo
+1
Submodule lib/support/oo added at 1f94bd8979
Submódulo
+1
Submodule lib/support/sass added at 2a648b3766
+1
-6
@@ -1,9 +1,4 @@
|
||||
---
|
||||
name: Express
|
||||
description: Sinatra inspired web development framework
|
||||
version: 0.7.0
|
||||
dependencies:
|
||||
- ext >= 0.2.2
|
||||
- oo >= 1.2.0
|
||||
- sass >= 0.3.0
|
||||
- haml >= 0.1.2
|
||||
version: 0.7.2
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário