Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
db.saveDoc(uuid.generate(), message, (er, ok) ->
if er
console.log 'DB error on input: ' +
$(message) +
$(er)
throw new Error $(er)
else
client.broadcast $(message)
console.log 'Wrote to couch: ' +
sys.inspect message
In cserv.coffee, Cannot read property '0' of undefined
db.saveDoc uuid.generate(), message, (er, ok) ->
if er
console.log 'DB error on input: ' +
$(message) +
$(er)
throw new Error $(er)
else
client.broadcast $(message)
console.log 'Wrote to couch: ' +
sys.inspect message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment