app.js
This file
Path
examples/upload/app.js
34 lines · 595 bytes · JavaScript
Last changed by
Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption046bee8
History of this fileTake it
12345678910111213141516171819202122232425262728293031323334
require.paths.unshift('lib')require('express')require('express/plugins')
configure(function(){ use(MethodOverride) use(ContentLength) use(CommonLogger) set('root', dirname(__filename)) enable('cache view contents')})
get('/', function(){ this.redirect('/upload')})
get('/upload', function(){ this.render('upload.haml.html')})
post('/upload', function(){ this.redirect('/upload')})
get('/public/*', function(file){ this.sendfile(dirname(__filename) + '/public/' + file)})
get('/*.css', function(file){ this.render(file + '.sass.css', { layout: false })})
run()