►
From YouTube: CharlestonJS Meetup NodeJS April, 22, 2021
Description
* NodeJS v16 is released
* Architect a Serverless Framework for NodeJS
A
Okay,
I'm
gonna
go
ahead
and
get
started
looks
like
it
might
just
be
me
and
you
robert,
so
let's,
let's
do
this
thing.
A
B
A
B
A
All
right,
hopefully,
you
can
see
my
screen:
okay
cool.
So
today
we're
going
to
talk
about
node.js
and
I've
got
a
little
presentation
to
do
regarding
a
node.js,
well,
a
serverless
framework
called
architect,
and
but
before
that
I
want
to
get
into
some
announcements.
A
Mark
your
calendar
for
may
27th.
I've
got
confirmation
that
the
distinguished
engineer
at
cyprus
will
be
given
a
presentation
on
visual
testing
and
he's
a
really
great
guy
gleb,
and
he
really
knows
his
stuff
when
it
comes
to
testing,
especially
visual
testing.
So
I
think
it'll
be
a
fantastic
presentation.
A
A
Basically,
you
can
call
set
timeout
within
a
weight
and
it
will
kind
of
yield
your
program,
so
that's
pretty
cool
and
then
the
web
crypto
api.
A
They
released
a
an
experimental
cut
of
that
and
you
know,
node
has
had
crypto
in
it
for
a
long
time,
not
the
the
money
crypto,
but
the
encryption,
crypto
and
they're
moving
their
their
api
to
be
consistent
with
the
web,
which
is
really
cool
because
that
means
you
can
write.
You
know
your
crypto
libraries
and
have
them
be
compatible
for
both
the
web
and
for
the
server
or
our
node.
A
And
then
probably,
if
you
have
a
m1
mac,
this
would
be
pretty
exciting,
but
the
pre-built
node.js
has
started
shipping
pre-built
binaries,
specifically
for
the
m1
architecture
which,
before
you
would
have
to
kind
of
build
your
own
node
runtime
to
to
run
in
that
native
chip
architecture
or
use.
A
The
rosetta,
I
think,
is
what
it's
called
that
converts
intel
to
to
arm.
So
that's
really
cool.
If
you
have
the
blazingly
fast
computers.
Now
you
can
just
pull
the
node
binary
down
and
run
it.
I
got.
B
Something,
in
my
mind,
is
telling
me
that
the
even
releases
for
node
are
the
the
like
official
major
long-term
ones,
and
the
odd
ones
are
dev.
Is
that
right.
A
Yeah,
so
the
the
the
even
ones
will
be
officially
supported,
long
term
right
and
and.
B
A
Ones
are
really
meant
for
them
to
introduce
new
features
and-
and
essentially
it's
pretty
much,
as
you
said
so
when
an
an
even
version
is
cut.
Basically,
all
the
features
that
were
introduced
in
the
odd
one
becomes
quote:
support
supported
right,
but
they'll
they'll
never
support
long-term
and
odd
release.
A
They
do
support
the
odd
release
in
between
the
lts
release
and
the
current
release,
and
and
what
support
means
also
to
be
clear
is
that
if
they
find
any
kind
of
security
vulnerabilities,
they'll
patch,
those
so
you'll
get
you
know,
16.1,
16.2,
etc,
16.0.1
very
rarely,
but
I
think
they
do
or
have
in
the
past
introduced
a
feature
in
an
even
one.
You
know
in
a
minor
thing,
but
it
was
always
additive
right.
A
It
was
never
breaking
so
does
that
help
a
little
bit
at
least
as
best
as
I
can
yeah
yeah.
A
Yeah
yeah,
so
there's
I
feel
like
there's
a
shift
going
on
in
web
development
and
and
it's
kind
of
shifting
in
in
two
spectrums,
if
not
more,
but
traditionally
with
web
development.
You
would
you
know
kind
of
have
a
web
server
right
like
express,
are
happy,
and
then
you
would.
You
know,
use
that
to
to
build
your
app
and
mainly
manage
your
server
business
logic
and
your
your
front
end
assets
and
those
assets
could
be
javascript
or
css
or
images,
etc.
A
And
then
it
was
up
to
you
to
figure
out
how
you
deploy
that
to
production
right.
You
would
set
up
servers,
put
a
load
balancer
in
front
of
it,
set
up
a
domain
set
up
all
of
these
things
and
make
sure
no
one's
trying
to
join
and
and
that
could
get
challenging.
So
there's
you
know
kind
of
platform
as
a
service
right
platform
as
a
service
gives
you
a
little
bit
easier
ramp
to
come
on
board.
Okay,
cool!
A
It's
looking
at
my
participants
so
platform
as
a
service
with
heroku
right.
You
could
do
a
git
push
and
deploy
and
and
there's
other
platform
as
the
services
out
there.
That
do
great
and
then
there's
there's
kind
of
docker
which
allowed
you
to
essentially
define
what
your
environment
would
be,
and
then
you
could
ship
that
as
an
image
and
then
any
container
runtime
would
run
exactly
that
image
and
then
there's
also
serverless
and
and
serverless.
A
Basically,
you
know,
tries
to
abstract
everything
away
and
give
you
a
single
function
in
terms
of
web
development.
That
single
function
is
an
endpoint.
So
if
I
say
list
you
know
get
widgets,
then
that
would
point
to
a
function
and
that
whole
function
is
wrapped
around
a
scalable
process.
So
it
would
have
the
the
you
know,
kind
of
api
gateway,
and
you
know
a
way
to
run
multiple
image
servers
if
you
will
per
a
maximum
amount
of
requests.
So
you
get,
you
know
you
don't
have
to
think
about
load
balancers.
A
You
don't
have
to
think
about
what
size
server
should
I
need
to
use.
You
can
just
say
I
need
x
amount
of
memory
and
x
amount
of
compute
power,
and
I
think
that's
really
really
interesting
and
I
think
there's
places
for
for
both
and
then
the
the
last
thing
that's
kind
of
coming
about.
Is
this
idea
of
edge
computing
or
our
edge
platforms
like
cloud
flare
workers
which
basically
allow
you
to
distribute
server
code
to.
A
As
if
you
would
do
a
content
delivery
network,
so
you
would
ship
your
code
instead
of
to
you
know,
like
amazon,
east
coast,
one
you,
you
would
ship
your
your
code
to
60
different
service,
centers
around
the
world
right
and
and
then
and
and
that
would
be
essentially
at
the
edge
and
their
technology
figures
out.
A
If
I'm
in
australia,
then
I'm
going
to
hit
the
closest
edge
in
australia
or
if
I'm
in
the
united
states
in
new
york,
I'm
going
to
hit
the
closest
edge
in
new
york-
and
you
know,
while
you
you
distribute,
maybe
your
static
assets
that
way-
and
this
will
allow
you
to
distribute
using
the
web
worker
api
some
server
attributes.
So
you
have
to
write
it
kind
of
like
a
what
you
would
write
a
web
worker
right.
A
So
you
have
event
handling,
but
but
it
it
does
introduce
kind
of
these
different
ways
of
doing
things.
That
kind
of
change.
How
gives
developers
options
on
how
they've
been
doing
it
before
and
architect?
Is
one
of
these
frameworks
focused
around
serverless
and
and
it's
just
a
different
approach,
and
I
wanted
to
bring
it
up
because
I
think
one
of
the
major
use
use
cases
of
node.js
is
web
applications
right
really.
A
The
first
thing
I
remember
is
seeing
you
know
a
a
web
server
written
in
three
lines
right,
so
that's
pretty
powerful
and
architect
is
an
opinionated
serverless
framework
and
it's
really
focused
on
developer
experience,
but
its
principles
are
very
minimalistic
right.
It
wants
to
remove
noise
and
friction
and
and
really
allow
the
developer
to
get
stuff
done.
A
The
way
that
it
kind
of
prioritizes.
That
is,
you
know,
first
thing
with
serverless
frameworks.
Well,
serverless
runs
in
the
cloud
right.
It's
a
function
that
runs
in
this
infrastructure
in
the
cloud
that
you
don't
have
to
think
about.
Well,
you
want
to
be
able
to
run
locally
right.
You
want
to
be
able
to
run
locally
and
see
so
it
gives
you
a
local
dev
environment
that
emulates
the
service
serverless
environment
and
it
gives
you
smart
configuration
or
a
common
term
is
infrastructure
as
a
service
and
I'll
show
you.
A
What
that
looks
like,
but
the
the
gist
of
it
is
is.
I
should
be
able
to
declare
what
I
want
to
happen
and
then
allow
the
framework
to
to
do
the
heavy
lifting
and
that's
what
a
configuration
does
and
then
secure
to
lease
privilege.
This
is
really
important
as
you
provision
infrastructure
on
a
platform.
A
You
don't
want
that
infrastructure
to
be
empowered
to
create
accounts
or
empowered
to
delete
accounts
right
or
to
send
emails
to
people
etc.
So
it's
important
that
what
you
deploy
has
as
least
privilege
as
possible
to
do
things
and
then
the
last
is
open
source
and
open
governance.
This
framework
is
managed
by
the
openjs
foundation
and
also
has
a
pretty
open
governance,
which
means
that
they'll
release
updates
every
so
often
and
and
they
go
through
a
regular,
regular,
less
regular
is
release
process.
A
Some
opinions
right,
it's
opinionated,
so
it's
like
they're,
really
focused
around
marrying
with
amazon
web
services,
specifically
land
lambda,
the
api
gateway
and
services
like
s3,
sqs,
etc,
and
again,
that
kind
of
gives
them
the
ability
to
create
this
declarative
configuration
which
you'll
see
so
a
quick
demo
see
if
I
can
split
my
screen
here.
B
A
Go
just
reduce
the
prompt
because
that's
annoying
so
to
get
started
with
it.
One
thing
is,
you
need
the
aws
cli
to
install
and
you
can
develop
without
an
account,
but
if
you
want
to
deploy
something,
you'll
need
an
amazon,
you
know
account,
and
you
know
they
have
a
really
great
free
program
where
you
get
a
bunch
of
free
stuff.
A
I
think
you
can
really
deploy
a
lot
of
this
a
lot
of
simple
apps
using
this
technology
and
and
spend
pretty
much
the
cost
of
the
domain
a
year.
So
you
can
deploy
stuff
without
spending
a
lot
of
money
which
is
also
kind
of
cool.
A
A
It's
got
an
inet
command,
it's
got
a
sandbox
command,
so
let's
go
ahead
and
do
arc
init
and
that's
just
going
to
a
net
this
directory
and
create
a
app.arc
file.
A
If
I
go
into
the
app.arc
file,
this
is
your
configuration
file
so
right
now
I've
got
a
name
for
my
app
and
I
can
give
it
any
name.
I
want
here.
It's
called
sandbox,
let's
call
it
chsjs
right
and
then
I've
got
this
http
line,
and
in
that
I
can
specify
my
endpoints.
So
I
can
do
git
root
post
root
or
I
can
say,
post
widgets
and
I
could
say,
put.
A
Widgets
id,
so
I
can
basically
define
my
routes
similar
to
how
I
would
define
them
in
express,
and
it's
going
to
basically
take
that
configuration
and
I
can
exit
out
and
just
run
rknet
again,
and
it's
actually
going
to
create
stubs
for
each
one
of
those
endpoints
and
each
one
will
be
in
a
separate
folder,
because
when
you
deploy
this
to
aws,
it
is
actually
a
separate
lambda
for
each
one.
A
A
A
It
takes
a
little
bit
to
load
there
we
go
and
so
that's
kind
of
the
getting
started
endpoint.
Let's
look
at
that
code
really
quickly.
A
So
one
of
the
cool
things
about
it
that
that's
a
little
bit
different.
It
takes
a
little
bit
to
get
used
to.
But
it's
a
better
pattern
and
I'm
starting
to
see
this
pattern
in
more
and
more
frameworks,
and
that's
really
where
with
node,
you
would
get
a
function
and
it
would
have
a
request
and
a
response.
A
And
then
you
return
essentially
a
a
response
object
and
that
object
has
like
your
status
code,
any
headers
that
you
want
and
any
body
and
the
benefit
of
that
is
you're
not
having
to
you
know,
get
this
response
injected
and
then
set
all
of
these
things
that
may
or
may
not
be
set
at
the
right
time
and
then
kind
of
sending
that
back.
A
So
this
kind
of
approach
makes
things
composable
right,
so
I
can
have
several
functions
and
then
they
can
pass
these
response
objects
to
the
their
calling
function
and
it
can
tweak
it
and
then
just
call
it
down
the
stack
all
the
way
to
the
response
itself
and
pass
it.
So
it
makes
it
it
gives
you
kind
of
this
compose
approach
to
middleware
versus
kind
of
the
stack
approach
to
middleware,
so
it
just
flows
better
on,
like
handling
things
coming
in
and
then
handling
things
coming
back
out.
Does
that
make
sense.
A
Exactly
exactly
so,
and
this
this
really
boils
down
architect.
Is
it
really
tries
to
you
know
not
do
too
much
magic,
keep
things
simple
where
you
can
extend,
so
you
can
use
a
template
language.
You
can
use
all
kinds
of
things
as
long
as
it
boils
down
to
a
string
as
your
response
out
the
door.
If
you
want
to
make
it
an
api
and
send
json
or
xml,
you
totally
can
do
it.
It's
right
there
in
front
of
you.
A
There's
there's!
No,
like
utilities
you
need
to
install
are
our
particular
things
and
anyway
it's.
A
I
think
this
is
kind
of
a
breath
of
fresh
air,
to
be
honest
with
you
and
just
to
to
show
you
that
that
this
works.
So
basically
we
just
change
the
the
response,
and-
and
now
I
really
spun
up
the
the
environment
and
we
go
back
now.
We
just
get
hello,
so
pretty
simple,
but
it's
always
nice
to
see
it
really
happen
and
and
what's
cool
is
you
can
go
and
into
this
open
this
app.arc
file
and
add
this
endpoint
in
this
endpoint?
A
So
it
makes
your
your
endpoints
declarative
and
they
map
to
to
particular
directories.
So
that's
that's
really
cool.
Now,
one
of
the
things
that
is
included
in
the
box,
which
takes
care
of
several
kind
of
pain
points,
is
this
notion
of
of
a
module
called
architect,
functions
and
architect.
Functions
has
a
lot
of
bits
in
it,
but
it
can
basically
make
your
public
directory
or
any
directory
you
find,
and
that
will
be
your
static
directory,
and
so
it
makes
it
super
easy
to
inject
static
assets.
A
Session
management
uses
http
http
only
cookies
that
you
set
but
you're
setting
it
like
a
key
value,
store
or
an
object.
So
when
you
set
it
and
it
takes
care
of
the
the
cookie
passing
for
you
automatically,
which
is
nice
and
then
path
parameters
you
get
request.params.whatever
and
queryparametersrequest.query
and
then
the
body
parsing.
It
looks
at
the
mime
type
and
figures
it
out
and
does
the
right
thing
with
parsing.
If
it
can
it
drops
it
to
raw
text,
so
there's
no
middleware,
you
have
to
install
to
do
that.
A
It
just
does
it
for
you,
which
is
kind
of
nice,
but
it's
easy
to
override
it
as
well.
So
when
you
get
that
request
object,
you
still
get
all
the
bits
that
are
coming
from
the
request.
These
are
just
sugar
enhancements
on
top.
So
if
you
want
to,
if
you're
like
well,
you
know
what
I
just
don't
like
their
body
parser.
I
want
to
do
my
own
body,
parsing,
you're
you're,
able
to
do
that,
and
I
like
that,
that
approach
a
lot.
A
And
sharing
code
there's
two
two
folders
that
you
can
create
and
all
this
is
configurable
you
can
specify
what
folders
to
use,
but
the
default
or
the
convention
is
a
source
shared
and
basically
any
code
you
put
in
that
folder
all
of
your
functions
can
pull
it
and
when
you
deploy
it's
going
to
take
that
code
and
any
of
your
global
dependencies
and
it's
going
to
apply
all
of
them
using
tree
shaking
to
each
folder,
because
in
lambda
each
folder
has
to
have
its
own
package
json
its
own
node
modules
and
all
that.
A
But
this
is
really
nice.
You
just
put
any
code
in
your
source,
shared
folder,
and
then
you
can
just
require
that
in
your
in
your
function,
by
this
little
helper
show
you
an
example
so.
A
At
architect,
slash
shared
and
then
whatever
the
name
of
your
file
is
so
it
would
be
like
architect
shared
and
then
whatever
your
file
is
in
that
directory
and
essentially
what
they're
doing
is
just
copying.
Those
files
into
node
modules
at
architect,
slash
shared
and
you
have
access
and
it's
it's
fully
recursive.
So
so
it's
really
easy
to
follow
and
and
pretty
easy
to
manage,
but
it
pays
off.
So
views
is
very
similar,
but
it
only
shares
the
views
folder
if
it's
a
get
request.
A
So
if
you
wanted
to
use
shared
views,
you
could
do
that.
I
actually
use
some
views
in
the
post
request,
so
I
just
use
shared,
but
but
it
is
there
and
and
to
deploy
all
you
need
to
do
is
type
arc
deploy
and
it
will
push
out.
A
I
think
I
I
think
I
did
that
or
can
do
that
here,
and
the
one
thing
to
note
is
that
you
do
need
an
access
key
and
a
secret,
so
you
would
set
that
up
as
an
environment
variable
and
then
just
do
art
deploy
and
that'll
basically
figure
out
your
aws
credentials.
What
you
specified
and
push
the
other
piece
is.
This
will
push
to
what
they
call
a
staging
environment
and
then
you
can
say
arc
deploy
production
and
it
will
push
to
a
production
environment.
A
So
they
go
ahead
and
carve
out
both
the
staging
and
a
production
for
you.
Maybe
I've
got
some
configuration
work
to
do,
but
but
that's
pretty
cool,
just
keep
it
simple.
There's
more!
You
can
do
notifications,
create
events
where
you
can
trigger
via
notifications,
pub
sub
scheduled
tasks
and
all
these
are
kind
of
wrappers
around
the
aws
services.
So
you
don't
have
to
think
about
their
api
or
whatever
you
just
really
declare
that
and
it'll
generate
a
function
just
like
it
generated
a
function
for
your
endpoint.
A
A
But
I've
been
working
with
architect
and
this
technology
htmx,
as
well
as
hyper
and
putting
together
kind
of
a
demo
with
all
all
of
this,
and
just
to
show
you
kind
of
a
more
rich
example
of
how
this
kind
of
can
come
together
in
just
a
minute.
B
A
A
Okay,
so
here
I've
got
like
a
public
folder
and
I've
got
a
tailwind
file
in
there.
For
my
css
and
I've
got
my
app
arc
file
and
you
can
see
I've
specified
some
auth,
endpoints
and
specified
you
know
kind
of
this
crud
notes
application
where
I
can
create
a
note
and
edit
it
and
save
it,
delete
it
list
it,
etc.
A
And
all
my
source
is
in
the
source
directory.
I've
got
this
shared
directory
where
I
have
kind
of
lib
and
views
and
my
my
views
are
basically
just
like
ejs
files.
It's
called
eta,
it's
kind
of
the
newer
version
of
ejs
and
they're,
just
server-side
templates,
which
is
pretty
cool,
and
then
I've
got
like
a
little
template
module
that
basically
pulls
all
of
those
in
and
then
I
can
just
render
them
by
saying
render
you
know,
index
or
render
notes,
etc.
A
And
then,
if
we
look
at
like
a
particular
endpoint,
let's
look
at
get
off.
That's
a
good
one.
So
so
with
git
auth
it
it's
making
a
call
out
to
github
oauth,
and
actually
it's
actually
just
returning
a
link
to
make
the
call.
And
then
the
user
clicks
that
button.
A
But
you
can
see
that
you
know
using
a
function,
get
my
request,
object,
check
some
stuff,
and
then
I
return.
You
know
status
code,
headers
and
body,
and
I've
got
my
little
template
renderer
guy
here.
That
takes
a
template
name
and
some
data.
B
A
And
then
like
when
the
auth
comes
back,
it
comes
back
to
this
login
and
just
to
kind
of
show
you
I
got
this
request
and
I'm
you
know
getting
the
query,
string
parameter
code
and
then
I
set
the
session.
So,
let's
see
when
I
return,
I
return
this
session
property
and
that
sets
account
into
an
http
only
cookie.
So
now
I've
got
my
session
set
and
to
log
out.
A
A
And
yeah,
so
what's
pretty
cool
about
this,
and
and
you
don't
have
to
just
use
server
side
templates,
you
can
use
react,
you
can
use
angular.
You
can
use
view
spell
anything
that
you
want
to
will
work
fine
with
architect,
but
one
of
the
things
that
I'm
playing
around
with
is
this
library
called
htmx
that
basically
gives
you
the
declarative
style
of
javascript,
so
so
the
javascript's
written
for
you
that
does
all
these
common
things
and
you
specialize
it
by
just
creating
little
h,
tml
attributes,
for
example,.
B
A
A
Oh
yeah,
here's
one
okay,
so
this
hx
post
will
actually
post
to
the
log
out
and
actually
do
a
a
post
on
on
a
button.
So
it's
like
instead
of
having
to
write
all
that
boilerplate
code,
you
just
do
hx
dash
post
and
give
it
up
endpoint,
and
then
it
actually
is
looking
for
html
coming
back,
so
it'll
it'll
take
html
and
come
back
or
it
could
take
a
302
redirect.
A
So
it's
really
kind
of
like
this
server-side
template
framework
with
kind
of
this
declarative,
javascript
library
on
top
and-
and
I
think
it's
pretty
interesting-
it's
it's
really
interesting
how
it's
coming
together!
Things
are,
you
know,
really
I
don't.
I
don't
want
to
say
cleaner,
but
they
feel
cleaner
right
now.
A
You
only
really
know
when
you
get
into
some
of
the
details,
but
but
anyway,
architect
is
definitely
something
to
check
out,
especially
if
you
want
to
put
together
some.
You
know,
quick
prototypes
or
if
you're
you're,
building
something
big.
I
think
versailles
or
architect,
or
these
serverless
kind
of
frameworks
are,
are
really
worth
checking
out,
because
you
again,
you
don't
have
to
think
about
data
centers
or
servers
or
things
like
that.
So
yeah.
B
Oh,
that's
really
cool
surprised
I
haven't
heard
of
it,
but
there's
so
many
things
out
there.
Nowadays,
it's
kind
of
like
it's
all
noise
I'll
see
what
sticks
around
for
a
couple
years.
A
Yeah
yeah
and
you
know
there-
there
is
a
lot
out
there
and
kubernetes
has
taken
over
a
lot
of
a
lot
of
stuff.
But
but
I
I
do
think.
A
Yeah
thanks
for
your
time,
hope
you
have
a
great
evening
and
talk
to
you
soon.