Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express'),
- YUI = require('yui3').YUI,
- app = express.createServer();
- YUI({
- debug: false
- }).use('express', 'node', function(Y) {
- app.configure(function(){
- app.set('views', process.cwd());
- app.set('partials', process.cwd());
- app.use(app.router);
- });
- app.register('.html', YUI);
- app.get('/', function(req, res, next){
- console.log("GET /");
- res.render('index.html', {
- locals: {
- partials: [
- {
- name: 'header',
- node: '#header'
- }
- ],
- content: '#content'
- }
- });
- });
- if (!module.parent) {
- app.listen(3200)
- console.log("Express server listening on port " + app.address().port)
- }
- });
Add Comment
Please, Sign In to add comment