app.js
This file
Path
examples/app.js
38 lines · 584 bytes · JavaScript
Last changed by
When Accept includes text/html display exceptions otherwise 500visionmediabefore adoptionbd4f150
History of this fileTake it
The walk stopped after 200 commits: lines older than 06c0b42 point at it.
Added mime() specsvisionmediabefore adoption06c0b42
line 1why, one step back1Cleaning up example appvisionmediabefore adoption05e9cc6
line 2why, one step back2require.paths.unshift('lib')Added mime() specsvisionmediabefore adoption06c0b42
line 3why, one step back3require('express')Added plugins.js for quick plugin mixinsvisionmediabefore adoption39b0e43
line 4why, one step back4require('express/plugins')Added mime() specsvisionmediabefore adoption06c0b42
line 5why, one step back5Defaulting views to <root>/viewsvisionmediabefore adoption84a7c51
line 6why, one step back6configure(function(){When Accept includes text/html display exceptions otherwise 500visionmediabefore adoptionbd4f150
line 7why, one step back7 use(CommonLogger)Cleaning up example appvisionmediabefore adoption05e9cc6
lines 8–9why, one step back8 use(MethodOverride)9 use(ContentLength)Defaulting views to <root>/viewsvisionmediabefore adoption84a7c51
lines 10–13why, one step back10 set('root', dirname(__filename))11 enable('cache views')12})13Added chat example (though not practical over http)visionmediabefore adoption9c5552c
lines 14–15why, one step back14var messages = []15Started chat examplevisionmediabefore adoption654c526
line 16why, one step back16get('/chat', function(){Added chat example (though not practical over http)visionmediabefore adoption9c5552c
lines 17–21why, one step back17 render('chat.haml.html', {18 locals: {19 messages: messages20 }21 })Cleaning up example appvisionmediabefore adoption05e9cc6
line 22why, one step back22})Added mime() specsvisionmediabefore adoption06c0b42
line 23why, one step back23Added chat example (though not practical over http)visionmediabefore adoption9c5552c
lines 24–30why, one step back24post('/chat', function(){25 messages.push(param('message'))26 halt(200)27})2829get('/chat/messages', function(){30 contentType('json')Added aliases of JSON.encode() and JSON.decode()visionmediabefore adoption0d9f502
line 31why, one step back31 return JSON.encode(messages)Added mime() specsvisionmediabefore adoption06c0b42
lines 32–33why, one step back32})33Started show exceptions supportvisionmediabefore adoptione728d3c
lines 34–37why, one step back34get('/error', function(){35 throw new Error('oh noes!')36})37Added mime() specsvisionmediabefore adoption06c0b42
line 38why, one step back38run()