Posts by Vitor George • 41 points
2 posts
-
1
votes2
answers896
viewsA: Block Save Repeated Data
You can make a validator which only allows the inclusion or alteration of a user if the email address does not exist in the collection: UserSchema.path('email').validate(function (email, done) { var…
-
3
votes1
answer380
viewsA: Nodejs socket client - callback for each request
You can use the async.series for that reason: async.series([function(done){ client.write('uma mensagem', 'utf8', function(data){ console.log('primeira mensagem enviada');; done(); });…