►
From YouTube: hyper connect workshop with Deno by Tom Wilson
Description
In this workshop, you will learn about hyper connect and create a update, remove and list endpoints for the Mario Wiki API.
Github Repository:
https://github.com/hyper63/workshops
A
So
what
is
hyperconnect
hyperconnect
is
a
client
module
or
a
software
development
kit,
whatever
you
want
to
call
it,
but
it
is
a
client-side
library
that
just
literally
provides
you
a
more
intuitive
api
experience
instead
of
having
to
do
all
of
the
restful
semantics,
so
it
basically
the
hyper
api
is
a
http
json
api.
A
You
may
call
it
rest,
but
it
basically
takes
json
data
and
returns
json
data
and
the
hyper
connect
module
just
gives
you
a
wrapper
around
that
so
that
you
really
just
give
it
a
connection
string
so
we'll
see
in
a
minute
and
you'll
be
off
up
and
going
so
what
we
want
to
do
if
you've
gone
to
hyper
63
workshops
and
logged
in
with
github.
A
A
Get
https
dot,
io,
pound,
https,
colon,
slash,
github,
dot,
com,
slash
hyper
63,
slash
workshops,
and
you
will
launch
a
visual
studio
code
window
similar
to
this
one,
and
once
you
have
that
up
and
running,
we
want
to
go
into
the
data
connect
folder
and
we
want
to
click
on
new
file
and
we're
going
to
create
a
dot
env
file.
This
dot
emv
file
will
contain
our
environment
variables
for
our
api
server
and
we
just
need
one
called
hyper
and
we
need
a
connection
string.
A
And
this
will
I'll
sign
out,
so
you
can
kind
of
see
the
the
login
process.
So
this
will
bring
you
to
the
hypercloud
dashboard
on
this
dashboard.
You'll
see
a
button
called
github.
If
you
haven't
already
logged
in
before
you'll
be
asked
to
authorize
this
application
with
your
github
account.
A
If
you
have
already
authorized,
then
it'll
take
you
to
the
application
list
page,
and
here
you
can
see
all
of
the
applications
I'm
going
to
use.
Well,
actually,
I'm
going
to
delete
this
application,
so
we
can
start
from
the
beginning.
So
I'm
going
to
delete
this
application
and
once
that's
done,
I
can
now
add
an
application.
So
I'm
going
to
add
a
new
application
and
a
hyper
application.
Is
your
infrastructure
for
your
your
app,
so
it
can
have
data
cache,
search,
queue
and
storage.
A
A
Then
I'm
gonna
come
over
to
get
pod
and
I'm
gonna
paste
that
in
right
there
in
my
environment
file,
so
I
have
hyper
equals
and
I
have
this
connection
string
cloud
colon,
slash,
blah
blah
blah
blah
blah
super
cool.
That's
what
I
need
to
run
my
server
so
I'll
close
that
window
and
in
the
terminal
I'll
type
scripts.
A
Setup
dot,
sh,
now
scripts
setup,
dot,
sh
is
going
to
essentially
preload
our
data
or
preload
our
data
service,
with
some
data
right
with
some
mario
data.
So
if
you
just
type
scripts
setup,
sh
that's
going
to
preload
our
data
and
I
need
to
move
my
terminal
into
the
data
connect
folder.
So
I'm
just
going
to
right
click
and
say
open
integrated
terminal
there,
and
now
I'm
going
to
type
scripts
setup.sh.
A
So
that's
going
to
basically
use
our
connection
string
that
we
set
up
in
the
emv
file
and
it's
going
to
create
four
records
character,
one
character,
two
character,
three
character:
four
awesome,
so
the
next
command
we
need
to
run
is
to
start
the
server.
So
we
want
to
do
scripts
start
sh
and
I'll
show
that
so
we
just
type.
A
Let
me
clear:
this
scripts
start
sh,
and
this
is
going
to
run
an
opine
web
server
because
we're
using
dino,
it's
literally
the
exact
same
as
using
express
if
you're
used
to
node
and
we're
running
this
server.js
file
and
what
we
want
to
do
is
implement
the
update,
the
delete
and
the
list
endpoints.
So
if
I
send
a
put
to
api
character,
slash
id
with
a
json
document,
I
want
to
update
the
data
source
with
that
document.
A
So
we'll
we'll
work
on
that
one
first
and
if
you
have
everything
running,
let's
go
ahead
and
just
create
a
new
terminal
and
we're
just
going
to
go
ahead
and
set
up
our
curl.
So
if
we
curl
localhost
3000
api
characters,
character
dash,
1
right,
that's
going
to
give
us
the
character,
mario,
and
what
we're
going
to
do
is
we're
going
to
want
to
update
that
so
I'm
going
to
copy
that
json
document
and
I'm
just
going
to
go
ahead
and
queue
up
what
I
want
to
happen.
A
A
Mario
mario
is
the
man
right
okay,
so
we
have
that
and
if
we
run
it
right
now
we're
going
to
get
a
message
not
implemented,
which
means
we
need
to
implement
it
with
hyperconnect.
So
I'm
going
to
re-cue
that
up
and
then
we're
going
to
use
our
command
p
command
p
and
we're
going
to
look
for
update
character,
dot.
Js
data
connect
api
and
we're
going
to
import
connect
from
hyper
connect.
A
And
now
we
need
to
create
our
hyper
instance
by
calling
connect
and
passing
in
the
environment
variable
that
we
set
called
hyper
okay
cool
now
that
we
have
that
now
we
can
work
on
this
handler,
which
this
handler
is
our
put
api
character,
slash
id
right.
So
what
we
want
to
do
is
do
an
await
for
hyper
dot
data,
dot,
update
and
now
the
update
method
takes
an
id,
so
we
can
say
request.params.id.
A
A
Now
in
a
real
world
application
you'll
do
more
than
this
right,
so
you
would
make
sure
this
body
is
the
right
schema
and
you
know
you
would
make
sure
you
would
handle
any
kind
of
error
cases
whatever,
but
for
the
purpose
of
this
workshop,
we're
just
trying
to
show
the
hyper
data
update
command,
which
is
a
promise
now
if
we
run
our
curl
command,
we
get
okay,
true
sweet,
so
our
code
worked
and
now
we
can
verify
by
doing
a
get
to
get
character
one,
and
you
see
that
our
description
is
is
added.
A
A
A
A
So
let's
do
curl
x,
post,
localhost,
3000,
api
characters
that
and
we
want
to
send
a
content,
type
application,
json
right
and
our
data
will
be
a
json
document
that
has
an
id
called
character.
A
One
oops
escape
out
so
an
id
character,
one
and
a
type
character,
and
the
name
mario
right
cool.
So
we
hit
enter
and
bam.
Now,
it's
back
in
there.
A
A
From
hyper
connect
and
we're
gonna
connect
or
create
a
hyper
instance
using
our
environment,
variable
that
and
then
we're
going
to
send
back
the
result.
A
A
Now,
if
we
just
wanted
to
send
back
just
the
documents,
we
can
just
do
that
and
that
would
just
send
back
the
documents
we
can
also
put
a
limit
on
it.
So
we
could
say
limit
two
like
that
and
it'll
only
return,
the
first
two
in
the
list
or
we
could
say,
start
key.
We
can
do
ranges,
so
we
can
say
start
key
character,
dash
2
limit
2
and
then
that's
going
to
return
the
two
and
three
characters
right
and
we
could
say
n
key.
So
we
could
say
n
key.
A
Tooth
and
then
that
should
return
one
and
two
okay
and
we
could
say
you
know
descending
true
right
so
limit
to
descending
true
and
then
that
should
reverse
the
list.
So
we
should
get
four
and
three.
A
A
Character
dashboard
like
that,
and
then
that
should
just
give
us
1,
3
and
4
and
skip
2..
So
that's
really
a
lot
of
the
features
of
the
list
function.
Now
the
list
function
will
give
us
all
the
documents.
So
if
there's
a
different
type
of
document
like
a
game
or
an
appearance,
it
would
include
those
as
well.
So
what
we
may
want
to
do
is
use
a
filter
to
make
sure
that
we
only
get
characters
in
this
case,
because
our
api
is
asking
for
characters,
so
we
could
say
dot
filter
by
type
character.
A
A
So
that's
pretty
cool
you
may
want
to
as
an
exercise
go
through
and
create
a
update
game,
remove
game
and
list
games
and
in
the
next
workshop,
we'll
talk
about
queries
where
you
can
do
more
advanced
kind
of
data
retrieval
than
just
a
then
the
list.
So
so
the
list
is
good
primarily
for
pagination
or
range
queries.
A
Things
like
that.
But
then
there's
a
query:
hyperdata.query
function
that
allows
you
to
send
essentially
like
a
where
clause
to
pull
back
data,
which
is
also
pretty
cool.
So.