email - Javascript event for incoming mail in 'mail-listener2' -


my previous problem running meteor mail-listener2. know how it, wondering, how make meteor react event 'mail' defined in 'mail-listener2'. listener worthless without reacting event.

free running javascript file of whole process in mentioned above post.

the "magic" allows meteor reactive between client , server ddp, , can leverage few ways.

one way have listener write mongodb , have normal flow of pub/sub handle it. basically, create collection represents messages. server publishes , client subscribes said collection. finally, "mail" listener code create document, place in collection, , rest should handled normal flow.

an alternative hack own ddp update publication. without going it, can create pub/sub stream isn't backed collection @ all. gave talk on @ tampa meteor's meetup last july, , examples gave can found here. in particular, if check out code in pubsubdemo2 see create several such publications, 1 of uses fs module node monitor filesystem status , push client. on client-side uses minimongo usual, code there works same way used to.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -