options.proxy = true --> options.proxy = { enabled: true }
authorDavid Schoonover <dsc@wikimedia.org>
Tue, 17 Jul 2012 17:48:14 +0000 (10:48 -0700)
committerDavid Schoonover <dsc@wikimedia.org>
Tue, 17 Jul 2012 17:48:14 +0000 (10:48 -0700)
src/server/middleware.co

index 327baec..aa15ec1 100755 (executable)
@@ -136,6 +136,7 @@ application = limn.application =
         ### setup options with defaults
         opts = _.merge {}, DEFAULT_OPTIONS, opts
         opx = opts.proxy
+        opx = opts.proxy = { enabled:opx } if typeof opx is 'boolean'
         opx.enabled = true if opx.enabled is false and (opx.whitelist or opx.blacklist)
         if opx.enabled
             opx.whitelist or= [ /.*/ ]
@@ -171,24 +172,11 @@ application = limn.application =
             # Route to the web services
             @use @router
         
-        # production config
-        @configure 'production', ->
-            ### FIXME
-            
-            # log all requests
-            @use express.logger()
-            
-            # show simple errors
-            @use express.errorHandler()
-        
         
         # development config
         @configure 'development', ->
             opts = {varDir, dataDir} = @set 'limn options'
             
-            # show exceptions, pretty stack traces ### FIXME
-            @use express.errorHandler { +dumpExceptions, +showStack }
-            
             # turn on pretty-printing of views
             @set('view options').pretty = true