Created
January 23, 2014 16:54
-
-
Save d-adamkiewicz/8582276 to your computer and use it in GitHub Desktop.
express and express-yui example
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
var express = require('express'), | |
exphbs = require('express3-handlebars'), | |
expyui = require('express-yui'), | |
app = express(); | |
expyui.extend(app); | |
// register file extension | |
app.engine('hbs', exphbs()); | |
app.set('view engine', 'hbs'); | |
app.get('/', expyui.expose(), function(req, res, next) { | |
res.expose({ | |
resMsg: "Message passed on '/' request" | |
}); | |
res.render('index'); | |
}); | |
app.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment