All language subtitles for 034-Emitting Comment Creation Events-git.ir

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

We're now going to move on to our common service.

We need to make sure that any time someone creates new comment we once again emit an event over to that

event bus.

In this case our event is going to look a little something like this.

They'll have a type of comic created and the data in this case will be the actual comment itself.

So once again we're going to send this over to the event bus and the event bus is going to echo so to

speak.

This event over to all of our different services we're going to once again see that we're going to get

a couple of forum for errors because again we don't have anything on the services themselves to receive

these events just yet.

All right.

So going to change back over to my editor I'm going to find the comments service folder.

Here it is right here.

Inside there I'll open up the index such as file at the very top.

I'll get access

all then go down to my code where I'm creating a new comment.

Here it is right here

I'll then add in right after we add in that new comment right there or we push it into that.

Right about right after that's really where we kind of save.

So to speak the comments.

I'll go ahead and we'll add in the axial stop post to local host colon four thousand and five flash

events and once again the data or the event they were gonna send over is going to have a type of something

like comment created and a data property that's gonna be the actual comment itself to remember a comment

is going to have the comment tidy some content and then in that case or in this case that is the entire

comment.

Well we're going to also add into this data property another property of post I.D. just to clarify exactly

what comment this thing is tied to in this case for data.

I'm going to put in the I.D. of comment I.D. the content and then finally our post I.D. as well which

is available inside this request handler.

Remember it's technically in that parameter string right there or the root string.

So we can access that using rec perhaps dot I.D. We'll say post I.D. is rec not prams dot I.D. then

once again I'm going to add on async to the wrapping function and awaits on the request itself.

OK.

ALEX Good.

So let's test this out again.

I'm going to flip on over to my browser to find the post we had just created.

And I'll add in some comments and submit it's I can refresh the page see some comments here.

And then finally I'll go over to my terminal and I'm going to expect to once again see a series of 4

4 errors coming out of our event bus.

Again that's because we don't have anything inside of our services yet to actually receive these events

yet.

That looks good.

Well at this point time we've now got two services that are emitting events whenever something interesting

happens.

So now we need to make sure that all of our services right now really just posting comments because

we've not yet created the query service as an endpoint where it can receive these events and then do

some processing on them.

If that service cares about the event that was just emitted in our scenario or in our case right now

our postal service and the common service don't really care whatsoever.

They just don't care about any incoming events out of the two that we've created common created and

post created.

But as soon as we make this query service Well we're definitely going to have something that is very

much interested in some events that are coming out of our application so quick pause right here.

We're going to start putting this and this those two event person who wrote handlers together in just

a moment.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.