Created
July 23, 2012 22:51
-
-
Save FLYBYME/3166750 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//code | |
var app = express.createServer(); | |
app.configure(function() { | |
app.set("view engine", "html"); | |
app.register(".html", jqtpl.express); | |
app.set('views', __dirname + '/views'); | |
app.use(express.bodyParser()); | |
app.use(express.methodOverride()); | |
app.use(express.cookieParser()); | |
app.use(express['static'](__dirname + '/public')); | |
app.use(express.session({ | |
secret : 'keyboard cat' | |
})); | |
app.use(app.router); | |
}); | |
//error | |
/home/bob/Dash/server.js:24 | |
app.register(".html", jqtpl.express); | |
^ | |
TypeError: Object function app(req, res){ app.handle(req, res); } has no method 'register' | |
at Function.<anonymous> (/home/bob/Dash/server.js:24:6) | |
at Function.app.configure (/home/bob/node_modules/express/lib/application.js:399:61) | |
at Object.<anonymous> (/home/bob/Dash/server.js:21:5) | |
at Module._compile (module.js:449:26) | |
at Object.Module._extensions..js (module.js:467:10) | |
at Module.load (module.js:356:32) | |
at Function.Module._load (module.js:312:12) | |
at Module.runMain (module.js:492:10) | |
at process.startup.processNextTick.process._tickCallback (node.js:244:9) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment