Permalink
Browse files

Tighten the code slightly

  • Loading branch information...
1 parent 59c03f4 commit ae1a30aff6e29859aa994ddc797c99d7b6b7a5a0 @jhs jhs committed Mar 28, 2012
Showing with 5 additions and 9 deletions.
  1. +5 −9 example/push.js
View
@@ -4,9 +4,8 @@
//
var fs = require('fs')
-var util = require('util')
-
var SP = require('static-plus')
+var SITE_ROOT = '/browserid/_design/browserid/_rewrite'
function main() {
var DB = process.argv[2];
@@ -18,16 +17,14 @@ function main() {
builder.read_only = true
builder.target = DB + '/_design/browserid'
- builder.template = __dirname + '/page.tmpl.html'
+ builder.on('die', function(reason) {
+ console.error('Builder died: %j', reason)
+ })
- var SITE_ROOT = '/browserid/_design/browserid/_rewrite'
+ builder.template = __dirname + '/page.tmpl.html'
builder.helpers.site = function(ctx) { return SITE_ROOT }
builder.helpers.couchdb = function(ctx) { return SITE_ROOT + '/_couchdb' }
- builder.on('die', function(reason) {
- console.error('Builder died: ' + reason)
- })
-
// The entire site has only one page, the landing page.
builder.doc({ '_id' : ''
, 'title' : 'BrowserID on CouchDB'
@@ -40,6 +37,5 @@ function main() {
})
}
-
if(require.main === module)
main()

0 comments on commit ae1a30a

Please sign in to comment.