Permalink
Browse files

move require statements into init

  • Loading branch information...
1 parent 7bb0356 commit 0718ed2da0bfe3718f6da2957b0cbc9d4996cf7a @yssk22 committed May 9, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 apps/posts/app.js
View
@@ -1,10 +1,5 @@
var path = require('path');
var couchapp = require('couchapp');
-var merge = require('sunrise').utils.merge;
-var parallel = require('sunrise').middleware.utils.parallel,
- js = require('sunrise').middleware.utils.js,
- css = require('sunrise').middleware.utils.css;
-var raiseError = require('sunrise').raiseError;
var ddoc = {
_id: "_design/posts" ,
@@ -32,6 +27,13 @@ ddoc.middleware = require('./middleware');
ddoc.views = require('./views');
ddoc.init = function(app, config){
+ var merge = require('sunrise').utils.merge;
+ var parallel = require('sunrise').middleware.utils.parallel,
+ js = require('sunrise').middleware.utils.js,
+ css = require('sunrise').middleware.utils.css;
+ var raiseError = require('sunrise').raiseError;
+
+
config = merge({
postsPerPage: 10
}, config);

0 comments on commit 0718ed2

Please sign in to comment.