Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object #<HTTPServer> has no method 'engine' #24

Closed
statico opened this issue Jun 6, 2012 · 3 comments
Closed

Object #<HTTPServer> has no method 'engine' #24

statico opened this issue Jun 6, 2012 · 3 comments

Comments

@statico
Copy link

statico commented Jun 6, 2012

Just tried the example:

app = express.createServer()
app.configure ->
    ...
    app.engine 'html', require('hbs').__express

...and I get:

Object #<HTTPServer> has no method 'engine'

Thoughts?

@statico
Copy link
Author

statico commented Jun 6, 2012

Here's the output of npm list:

├── coffee-script@1.2.0 
├─┬ express@2.5.9 
│ ├─┬ connect@1.8.7 
│ │ └── formidable@1.0.11 
│ ├── mime@1.2.4 
│ ├── mkdirp@0.3.0 
│ └── qs@0.4.2 
├─┬ handlebars@1.0.5beta 
│ ├─┬ optimist@0.3.4 
│ │ └── wordwrap@0.0.2 
│ └── uglify-js@1.2.6 
├── hbs@1.0.3 
└─┬ optimist@0.3.4 
  └── wordwrap@0.0.2 

@defunctzombie
Copy link
Collaborator

That example is for the upcoming express 3.x (I should make that clearer)

For express 2.x you can use:

app.register('html', require('hbs'));

@statico
Copy link
Author

statico commented Jun 7, 2012

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants