Next-Gen
Serverside
JavaScript!

Hi, I'm
Wes Bos

Hamilton, On 🇨🇦

@wesbos on 𝕏, gram, tok, tube and suits

Web
Dev
Courses

+

syntax.fm × @syntaxfm × sentry

What is this talk about?

Server Side JavaScript

JavaScript Runtimes

Engines + APIS === Runtime

V8 →

Spider Monkey →

JavaScriptCore →

Node.js

Deno

[Deno Deploy, Netlify Edge, Supabase Edge]

Cloudflare
Workers

[Workerd]

Bun

Fastly
Compute
@edge

Alibaba
Edge
Compute

llrt

*experimental*

So if my math is correct...

3 Browser JS Runtimes

6+ Server JS Runtimes

The next generation of server JS we write will be standards based.

Yes, run it anywhere, but it also means we have interchangable + composable layers

Should you care?

maybe. You should care about the standards

WHY

Why do we have so many runtimes?

Better

Faster

Faster - Cheaper?

Stronger

Server Kinds

Traditional VM / Long Running Server

Serverless Functions

Edge Functions

What's a poor dev to do? Support 6+ Runtimes?!

well, ya. But also no.

Web Standards

TC39

Async + Await, esm, const, arrow functions

W3C

WebRTC, Streams API, Web Components

WHATWG

Fetch, Service Workers, Resize Observer

Browser JS is Server JS

JS is JS

We don't need different ways to do the same thing

Let's look at some of those standards

Fetch

Web Request + Web Response are life

In the Browser, We send Requests

On the Server, we handle them!

Node

Not Native, But:

Hono.js, H3, @whatwg-node/server, Fastify Plugin, Next.js Routes, Sveltekit, Astro + more

Web Streams

Blow Chunks as you have em

Events!

Listen for events on anything!

Form Data

Web Workers

alert()
prompt()
confirm()

Async
Local
Storage

Really cool new API

Developer Ecosystem

The tooling is standardizing on standards

unenv

Deno, Bun, Cloudflare, Node

Think of these as standards based Express that can run anywhere.

HMR, Routing, Middlware, Caching, Web Sockets, Assets

Vite + Nitro = Vinxi

Build your own Framework

Any JS LIb + Standard Server = Metaframework

Tanstack Start

Client: Vite, Tanstack Query, Tanstack Router

Server: Vinxi → Nitro → H3 → srvx

import { DOMParser, parseHTML } from 'linkedom/worker';

JSDom Alternative. Works everywhere

HTMLRewriter

So much more!

This ins't write once work everywhere

At least not yet...

It is a set of standardized APIs and an ecosystem of tools that work together

Future Server JS isn't about making it work everywhere.

It's about building with standards, enjoying the huge ecosystem's best tools and having the choice for it to run anywhere.

Thanks

@wesbos