Skip to content
Myr

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 file

Take it

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption046bee8

lines 1–34why, one step back
1
2require.paths.unshift('lib')3require('express')4require('express/plugins')56configure(function(){7 use(MethodOverride)8 use(ContentLength)9 use(CommonLogger)10 set('root', dirname(__filename))11 enable('cache view contents')12})1314get('/', function(){15 this.redirect('/upload')16})1718get('/upload', function(){19 this.render('upload.haml.html')20})2122post('/upload', function(){23 this.redirect('/upload')24})2526get('/public/*', function(file){27 this.sendfile(dirname(__filename) + '/public/' + file)28})2930get('/*.css', function(file){31 this.render(file + '.sass.css', { layout: false })32})3334run()