Permalink
Browse files

Update example to reflect changes in Jade style and Express middlewar…

…e API.

Cuz Node's too cool to not make pointless breaking changes.
  • Loading branch information...
1 parent af95ab9 commit 23466c3f0de61209167fd2a3b2480d3ff9f456d4 @evnm committed Jul 26, 2011
@@ -15,10 +15,10 @@ var sys = require('sys')
// Create and configure an Express server.
var app = express.createServer();
app.configure(function () {
- app.use(express.staticProvider(__dirname + '/public'))
+ app.use(express.static(__dirname + '/public'))
, app.use(express.logger())
- , app.use(express.bodyDecoder())
- , app.use(express.cookieDecoder())
+ , app.use(express.bodyParser())
+ , app.use(express.cookieParser())
, app.use(express.session({ key: 'skey', secret: '1ts-s3cr3t!'} ));
});
@@ -4,7 +4,7 @@ ul#dir_contents
- items.forEach(function(item) {
li
- if(item.is_dir)
- a(href: '/file_browser' + item.path) #{item.path}
+ a(href='/file_browser' + item.path) #{item.path}
- else
#{item.path} (#{item.size})
- - })
+ - })
@@ -2,7 +2,7 @@
html
head
title #{title}
- link(rel: 'stylesheet', href: '/style.css')
+ link(rel='stylesheet', href='/style.css')
body
#wrapper
- != body
+ != body
@@ -1,10 +1,10 @@
h1 Enter your Dropbox credentials
-form(method: 'post', action: '/process_creds')
+form(method='post', action='/process_creds')
div
- label(for: 'email') Email:
- input(type: 'text', name: 'email', id:'email')
+ label(for='email') Email:
+ input(type='text', name='email', id='email')
div
- label(for: 'password') Password:
- input(type: 'password', name: 'password', id:'password')
+ label(for='password') Password:
+ input(type='password', name='password', id='password')
div#editArticleSubmit
- input(type: 'submit', value: 'Login', class: 'submit')
+ input(type='submit', value='Login', class='submit')

0 comments on commit 23466c3

Please sign in to comment.