Browse files

Fix how port gets set

  • Loading branch information...
1 parent 171ad43 commit 133b0c50d9f454bbf6b0e2d015f80ac665e03a8f @skalnik committed Dec 31, 2011
Showing with 4 additions and 14 deletions.
  1. +1 −1 Procfile
  2. +3 −13 bin/server
View
2 Procfile
@@ -1 +1 @@
-web: ./node_modules/.bin/coffee bin/server -p $PORT
+web: ./node_modules/.bin/coffee bin/server
View
16 bin/server
@@ -15,17 +15,7 @@ app.configure 'development', ->
app.configure 'production', ->
app.use express.errorHandler()
-argv = []
-options = {}
-for arg in process.argv
- if arg.substr(0, 2) == '--'
- parts = arg.split '='
- options[parts[0].substr(2).replace('-','_')] = parts[1] || true
- else
- argv.push arg
+port = process.env.port || 3000
-require('../app').actions app, argv, options
-port = options.port || 3000
-
-console.log "meme_gen server listening on port %d in %s mode", port, app.settings.env
-app.listen port
+app.listen port, ->
+ console.log "Listening on #{port}"

0 comments on commit 133b0c5

Please sign in to comment.