Permalink
Browse files

Check for nodester port

  • Loading branch information...
1 parent ff0a1dc commit 964a8bc352a2dcc8476c2ceb45f92ceb41138f45 @distracteddev committed Oct 26, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 app.js
  2. +2 −1 dictum/server/rpc/comments.coffee
View
2 app.js
@@ -293,7 +293,7 @@ app.router.path('/\/animals', function () {
});
-var port = process.env.PORT = process.env.PORT || 9000;
+var port = process.env.PORT = process.env.PORT || process.env.app_port || 9000;
app.start(port);
app.log.info("Started at http://localhost:" + port + "/");
@@ -43,7 +43,8 @@ exports.actions = (req, res, ss) ->
newReply.save (err, saved_reply) ->
if err is null
# console.log "Reply added to Comment Succesfully", saved_reply
- saved_reply.ctime = (new Date(saved_reply.ctime)).toLocaleDateString()
+ saved_reply.ctime = (new Date(+saved_reply.ctime)).toLocaleDateString()
+ saved.replies = JSON.parse(saved.replies) if typeof saved.replies is 'string'
ss.publish.channel post_id, 'newReply', saved_reply
res(true)
else

0 comments on commit 964a8bc

Please sign in to comment.