►
Description
We're back with the Mario Wiki Part 2 of the Hyper NodeJS Workshop
Starting with this repo = https://github.com/hyper63/demo-mario-wiki-part-1
We will build out the Show, Remove and Delete of a game document.
A
A
A
Clone
that
repository
or
or
fork
it
and
go
from
there.
So
if
you
haven't
done
the
previous
workshop,
you'll
need
to
do
that.
One
first
are
and
that
would
be
most
helpful
to
follow
along
or
you
could
start
here,
but
but
it
may
you
know
you
may
get
lost
a
little
bit.
So
in
the
description
there
will
be
a
link
to
the
first
workshop
and
highly
recommend
you
do
that.
A
To
hyper
63.
A
Demo,
mario
wiki
part
1.,
so
what
we're
going
to
do
is
we're
going
to
fork
that,
because
that's
pretty
much
all
the
code
we
did
in
the
previous
workshop.
So
we're
going
to
fork
that,
let's
see
it's
not
going
to,
let
me
fork
it
because.
A
We
can
make
that
public
and
we'll
create
that
repository
and
then
we're
just
gonna
copy
this
url
to
our
get
repo.
So
we'll
copy
that,
and
I'm
just
going
to
refresh
this,
sometimes
it
gets
hung
there
we
go.
So
what
we're
just
going
to
do
is
in
our
git
remote.
A
And
we'll
zoom
in
on
that,
what
we
want
to
do
is
replace
origin
and
so
we'll
say:
git
remote,
remove
origin,
get
remote,
add
origin
and
we'll
paste
our
part,
two
repo
and
then
we'll
just
do
a
get
push
origin
master.
And
then
that
should
update
our
part
two
here
and
that
way
we've
got
a
clean
slate.
A
You
could
continue
working
on
part
one
if
you
wanted
to,
but
this
is
just
a
have,
a
clean
repo
that
has
the
part
2
stuff
in
it.
B
A
So
I'm
going
to
try
to
to
do
this
via
views
and
controllers
and
models
kind
of
outside
in,
but
you
can
kind
of
work
on
these
features
any
way
you
want.
A
A
And
then,
in
our
main,
what
we
want
to
do
is
show
the
game,
so
the
user
will
click
on
a
card
and
then
we'll
take
them
to
this
screen
and
show
the
game
and
that'll
be
in
a
section
and
we'll
do
an
h2.
A
And
game
dot
published
cool.
So
that's
our
view,
but
we
do
want
to
have
kind
of
a
little
button
section
here.
So,
let's
just
add
a
div
and
then
we'll
say:
href
equals
this
will
be
games.
A
A
A
A
Okay,
so
that's
our
show
page.
It's
going
to
give
us
a
the
view
of
the
game
document,
we'll
see
the
name,
the
description
and
it's
published
and
we'll
have
two
buttons
to
edit
and
remove,
and
then
we
have
some
script
to
handle
our
remove
function
and
obviously
the
edit
will
link
to
in
an
edit
view,
which
will
be
our
form.
A
A
A
We'll
call
hyper
to
get
it,
so
this
is
going
to
take
an
id
and
we'll
call
hyper
to
get
our
document
using
the
weight,
dot,
hyper.data
dot,
get
id
and
then
we'll
validate.
It
now
might
think
that
you
know
it
should
be
correct
right,
but
what,
if
they
pass
an
id
that
may
be
of
a
different
document
or
whatever
we
want
that
to
air
out.
So
we
want
to
validate
this
game
and
make
sure
that
it's
successful.
A
A
Okay
and
then
we'll
add
our
endpoint,
so
it'll
be
app.get.
Slash
games,
slash
id
again
ship
that
cool
all
right.
So
now
we
just
need
to
modify
our
list
view.
So
if
we
go
in
our
views,
our
index
view-
and
we
just
need
to
add
an
href
around
each
card,
so
each
aside
is
a
card
and
we're
just
going
to
do
an
href
and
we're
going
to
go
to
games.
A
A
A
Okay,
all
right.
So
it's
a
good
sign
that
our
server
is
still
running.
Let's
go
over
here
to
games
and
we
do
have
the
pointer.
So
that's
a
good
sign.
So
let's
choose
one
and
could
not
find
matching
close
tags.
So
we've
got
a
little
bug.
It's
probably
on
the
show.
Ejs
would
be
my
guess
so
I'll
go
to
show
ejs
and
let's
see.
A
A
A
A
A
Id
now
you
could
just
call
data.remove
dot
id,
but
I
want
to
make
sure
it's
a
valid
game
before
I
remove
it.
So
I'm
gonna
go
ahead
and
just
do
game.
A
A
Okay,
so
all
is
well
in
the
world.
So
let's
give
it
a
spin.
Let's
go
to
home
gains.
Miss
pac-man
is
not
a
mario
game.
So
let's
remove
it
and
cool.
We
came
back.
Miss
pac-man's
gone.
A
A
So
getting
started
with
that.
We
need
to
kind
of
work
on
the
the
server
so
we'll
start
at
the
server
and
handle
our
edit
url.
A
A
A
B
A
And
so
descriptions
optional,
so
we're
gonna
go
ahead
and
default
description
equal
to
blank
and
then
we're
gonna
basically
bring
in
game.
So
if
game
has
the
description
already,
then
it'll
overwrite
this
default
here
that'll
just
make
things
easier
and
we're
returning
so
on
this.
If
then,
we
can
just
leave
this
all
the
same,
and
we
should
be
good.
A
Okay,
so
games,
we
add
a
game
that
looks
good.
We
edit
again
cool
we've
got
our
data.
We
want
to
change
this
to
edit
and
we
need
to
modify
the
view
to
have
a
id
and
as
a
hidden
field.
A
A
A
If
game
id
exists
and
then
the
same
thing
we're
going
to
do
another
if
statement
right
here
and
if
the
id
exists,
so
it's
just
id
it's
helpful,
then
we're
going
to
add
this
hidden
id
field
which
will
get
posted
back
to
our
server.
Okay
and.
A
All
right
and
then
what
we'll
we'll
do
is
we
have
to
just
basically
do
a
check
here.
A
B
B
B
A
So,
let's
give
it
a
shot.
Oh,
I
think
I
forgot
one
thing
so
we
added
this
update
function,
but
we
didn't
add
it
to
our
model.
So
we
need
to
go
to
our
game
model
and
add
that
update
function.
So
I
get
a
models
game.
A
A
A
So
we
implemented
the
show
the
update
and
remove
game
feature
remove
for
the
game
model,
so
that
kind
of
concludes
this
part
of
the
workshop.
A
A
Character
literally
will
be
the
same
model
as
game,
except
for
having
a
type
of
character,
and
what
I
encourage
you
to
do
is
practice
doing
the
character
using
the
same
steps.
We
did
the
game,
so
you
know
views
and
controllers
and
models.
You
would
have
a
character
model.
You
would
have
a
folder
called
characters
and
have
all
of
these
controllers
and
views.
You
would
have
a
folder
called
characters
and
you
would
have
all
of
these
views
and
then
would
wire
it
up.