►
From YouTube: Build a chat app with SignalR Core - Mikael Mengistu
Description
In this video Mikael Mengistu shows us how to build a simple chat app with SignalR Core.
A
B
So
we're
going
to
start
out
by
writing
our
server
code.
Here,
you
can
see
we're
working
in
a
class
called
chat
hub
which
derives
from
our
signal.
Our
concept
of
a
hub,
the
hub
is
sort
of
the
basic
programming
model.
It's
an
abstraction
over
a
persistent
connection
between
your
client
and
your
server,
and
it
basically
is
what
allows
you
to
send
the
real-time
updates
between
your
client
and
server
and
which
allows
you
to
really
you
get
that
real-time
functionality.
Okay,.
A
B
A
B
C
B
A
B
So
here,
I've
already
written
this
client
code,
I'm
just
going
to
paste
it
into
these
script
tags
and
what's
happening.
First,
is
we're
establishing
our
hub
connection
at
the
chat
endpoint
like
we
just
configured
and
then,
if
you
remember
from
the
hub
we're
telling
our
client
to
invoke
their
send
method.
So
we
need
a
send
method
on
our
client,
so
we're
sending
hub
connection
on
send
execute
this
function
with
the
parameter
message.
So
all
we're
going
to
do
is
create
a
list
element.
Give
it
the
inner
text
of
the
message
that
we've
just
received
yeah.
C
C
B
From
then
on,
it's
ready
to
receive
indications
from
the
server
and
also
create
its
own
invitations
to
the
server.
So
what
we
do
here
is
we
basically,
in
our
form,
just
add
an
event
listener
to
the
submit
event,
and
we
just
pull
the
text
from
our
forum
UI
and
we
just
invoke
send
on
the
server
and
that
will
invoke
sign
on
all
the
clients
and
I'll
get
the
message
that
we
just
passed
in
now:
let's
go
ahead
and
run
the
application,
so
that
might
run.
B
So
this
is
the
application
hosted
at
locals,
5001
browser
chrome
here
on
our
left
and
then
on
edge
on
our
right.
And
so,
if
we
go
ahead
and
we
can
say
from
chrome
and
we
hit,
sin
will
get
it
instantly
on
both
browsers
without
having
to
refresh-
and
we
can
say
hello
from
edge
here
and
they
can
go
ahead.
Go.
A
Back
and
forth
and
forth,
you
can
be
like
thanks
for
coming
to
code
conversations
and
goes
back
and
forth
and
back
and
forth.
So
this
is
a
really
sweet,
demo
and
I'm.
Presuming
that
everyone
who
is
watching
this
at
home,
we
probably
want
to
know
how
they
can
have
a
look
at
what
the
team's
doing.
Where
can
they
go
to
learn
more
yeah.
B
A
Really
looking
forward
to
using
Segel
are
more
and
if
people
build
anything
missing
or
please,
they
should
reach
out
to
you.
Your
Twitter
handle
be
right
at
the
bottom.
I
want
to
know
what
you're
doing
and
we're
always
excited
to
hear
from
you.
So
thank
you
so
much
for
coming
and
thank
you.
Alright
see
you
next
time.