Skip to content

Commit

Permalink
ad npm modules to static_require
Browse files Browse the repository at this point in the history
  • Loading branch information
voloko committed Apr 25, 2011
1 parent 24fe542 commit 84632c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions express.js
Expand Up @@ -2,7 +2,7 @@ var express = require('express'),
path = require('path'),
sr = require('./tools/static_require'),
fs = require('fs');

var HOST = '0.0.0.0',
PORT = 8000;

Expand Down Expand Up @@ -67,7 +67,9 @@ app.get('/test/qunit/*', function(req, res){
});

app.get('/*.js', sr.getHandler({
searchPaths: [fs.realpathSync(path.join(__dirname, 'src'))]
searchPaths: [
fs.realpathSync(path.join(__dirname, 'src'))
].concat(require.paths)
}));

app.get('/*', function(req, res) {
Expand Down

0 comments on commit 84632c5

Please sign in to comment.