Joined January 2014
·

Allan Bazinet

San Jose, CA
·
·

Great article, thanks. Found one oddity in the implementation here; I was ending up with cookie objects in Mongo that had a 'data' subobject, containing unmerged fields. To resolve this, I run the inbound data on the set method through this function:

serialize = (session) ->
  data = {}
  for key, value of session
    data[key] = value?.toJSON?() or value unless typeof value is 'function'
  data
Achievements
9 Karma
0 Total ProTip Views
Interests & Skills