Utilizing __dirname
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by visionmedia · committed by visionmedia · parent 2a4cbb1 · Browse files · 4 files·+10 added−10 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+10 added−10 removed
- other:+10 added−10 removed
Provenance
- Commit
634503b- Tree
bd5b42b- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent
2a4cbb1
4 files changed+10 added−10 removed
modified:examples/chat/app.js+2 added-2 removed
5 unmodified lines678910101112131432 unmodified lines4748495051515253545515 unmodified lines5 unmodified linesconfigure(function(){ use(MethodOverride) use(ContentLength) use(CommonLogger) set('root', dirname(__filename)) set('root', __dirname) enable('cache static files') //enable('cache view contents')})
32 unmodified lines }, 100)})
get('/public/*', function(file){ this.sendfile(dirname(__filename) + '/public/' + file) this.sendfile(__dirname + '/public/' + file)})
get('/*.css', function(file){ this.render(file + '.sass.css', { layout: false })15 unmodified linesmodified:examples/upload/app.js+2 added-2 removed
5 unmodified lines678910101112131411 unmodified lines262728293030313233343 unmodified lines5 unmodified linesconfigure(function(){ use(MethodOverride) use(ContentLength) use(CommonLogger) set('root', dirname(__filename)) set('root', __dirname) enable('cache view contents')})
get('/', function(){11 unmodified lines this.redirect('/upload')})
get('/public/*', function(file){ this.sendfile(dirname(__filename) + '/public/' + file) this.sendfile(__dirname + '/public/' + file)})
get('/*.css', function(file){ this.render(file + '.sass.css', { layout: false })3 unmodified linesmodified:lib/express.js+4 added-4 removed
123456345678
var path = require('path')require.paths.unshift(path.dirname(__filename) + '/support/js-oo/lib')require.paths.unshift(path.dirname(__filename) + '/support/ejs/lib')require.paths.unshift(path.dirname(__filename) + '/support/haml/lib')require.paths.unshift(path.dirname(__filename) + '/support/sass/lib')require.paths.unshift(__dirname + '/support/js-oo/lib')require.paths.unshift(__dirname + '/support/ejs/lib')require.paths.unshift(__dirname + '/support/haml/lib')require.paths.unshift(__dirname + '/support/sass/lib')require('oo')require('express/core')modified:Readme.md+2 added-2 removed
55 unmodified lines56 57 configure(function(){58 use(MethodOverride)59 use(ContentLength)60- set('root', dirname(__filename))60+ set('root', __dirname)61 })62 63 get('/hello', function(){64 this.contentType('html')37 unmodified lines102 $ node spec/node.js routing103 ...104 105 Express is currently being developed with node --version:106- v0.1.24-13-ge2abc5f106+ v0.1.27107 108 ## More Information109 110 * [JavaScript Extensions & Utilities](http://github.com/visionmedia/ext.js)34 unmodified lines