daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Jun 19th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var express = require('express'),
  2.   YUI = require('yui3').YUI,
  3.   app = express.createServer();
  4.  
  5. YUI({
  6.   debug: false
  7. }).use('express', 'node', function(Y) {
  8.   app.configure(function(){
  9.     app.set('views', process.cwd());
  10.     app.set('partials', process.cwd());
  11.     app.use(app.router);
  12.   });
  13.  
  14.   app.register('.html', YUI);
  15.  
  16.   app.get('/', function(req, res, next){
  17.     console.log("GET /");
  18.     res.render('index.html', {
  19.       locals: {
  20.         partials: [
  21.           {
  22.             name: 'header',
  23.             node: '#header'
  24.           }
  25.         ],
  26.         content: '#content'
  27.       }
  28.     });
  29.   });
  30.  
  31.   if (!module.parent) {
  32.     app.listen(3200)
  33.     console.log("Express server listening on port " + app.address().port)
  34.   }
  35. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top