From e5974bd7a1fba922dd88a94399a5b9b14a04a90c Mon Sep 17 00:00:00 2001 From: Julien Castelain Date: Thu, 12 Jul 2012 19:13:28 +0200 Subject: [PATCH] updated arguments --- app.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.coffee b/app.coffee index f522fce..750ea06 100644 --- a/app.coffee +++ b/app.coffee @@ -18,14 +18,14 @@ app = express.createServer() ### parse args (- coffee and the filename) ### ARGV = process.argv[2..] -rargs = /--\w+/ -rprod = /^--production/ +rargs = /-{1,2}\w+/ +rprod = /-{1,2}(p|production)/ for s in ARGV m = rargs.exec s app.env = 'production' if m and m[0] and m[0].match rprod - +console.log app.env ### express configuration ### app.configure -> app.set 'views', __dirname + '/views' @@ -77,4 +77,4 @@ app.listen 3000, -> console.log '|______|___/ .__/|_| \\___||___/___/\\___/ ' console.log ' | | ' console.log ' |_| ' - console.log "Server listening on port %d", app.address().port \ No newline at end of file + console.log "Server listening on port %d", app.address().port