Yesterday’s NodeKit demo made me realise how much I want some sort of hot module reloading in NodeKit sooner rather than later. So, first step, you gotta map your dependencies… ;)

✅ Step 1

And when I say ALL the code, I mean ALL the code. That’s the only file in the project.

You run the project by running NodeKit:

nodekit

That’s it. No build stage, no configuration, nothing.

Show thread

This is ALL the code you need in NodeKit to create a server-side rendered STREAMING view of your Mastodon public timeline.

Join us at 5PM UTC today to see me recreate this live on Small Is Beautiful.

owncast.small-web.org

And when I say ALL the code, I mean ALL the code. That’s the only file in the project.

You run the project by running NodeKit:

nodekit

That’s it. No build stage, no configuration, nothing.

By the way, when I say that’s all the code. I mean that’s ALL the code in the whole project:

github.com/small-tech/nodekit/

Run `nodekit` on that folder, get the result in the browser.

No scaffolding. No configuration. No bundlers.

Show thread

So I just got this running. This is all the code you need to display a basic fediverse public timeline using NodeKit right now.

(If you remove the CSS, that’s 31 lines. That’s it. That’s the WHOLE APP!) :)

First rule of creating something simple for others: you need to take the complexity hit yourself. *returns to rummaging through the internals of V8 virtual machines and Node ESM Loaders…*

Node’s (experimental) VM Module functionality is awesome. Just rewrote the NodeScript feature in NodeKit to use it (and replace my initial “write to file system and import” hack).

What’s NodeKit?

ar.al/2022/01/26/nodekit-updat

By the way, sorry, I keep writing small-web in the GitHub URL instead of small-tech.

The working link for the NodeKit repository is:

github.com/small-tech/nodekit

Show thread

This is how much code it takes in NodeKit to create a server-side rendered page that uses Svelte and persists to a database.

Watch the whole video at: ar.al/2022/01/26/nodekit-updat

NodeKit update: what’s changed since last week (instant server starts, the nodekit command, etc.)

vimeo.com/670175367

I love that NodeKit builds in under half a second thanks to the magic of esbuild. I plan to keep that characteristic as it matures :)

(The web apps you serve with NodeKit have no build stage.)

github.com/small-tech/nodekit

You can see a demonstration of an earlier version of NodeKit from this Thursday on the recording of the latest Small Is Beautiful:

small-tech.org/videos/small-is

Show thread

w00t! NodeKit is now a standalone server:

nodekit [path to serve]

Svelte is now also loaded from within the NodeKit distribution (via a custom ES Module resolver) so you don’t have to worry about importing it when writing NodeScript.

github.com/small-tech/nodekit

Small Is Beautiful #15

This month, we extend a friendly middle finger to web3 with the web0 manifesto, talk about Laura’s presentation for Ikea on ethical design, and introduce you to NodeKit.

vimeo.com/668568565

Just finished the “slides” for today’s Small Is Beautiful where we’ll be talking about web0 and Laura’s presentation at Ikea, and I’ll demoing a very early NodeKit for the first time.

small-tech.slides.com/aral/web

(Note: these are green-screened onto the video.)

Join us live in one and a half hours – at 5PM Irish Time (UTC) – for Small Is Beautiful.

small-tech.org/small-is-beauti

So the cool thing about SVGs is that they’re just text. Screenshot shows before/after of hand-tweaking the NodeKit logo as exported from the excellent @penpot – much neater ;)

(Even though I’d snapped to pixels in the interface, the export had floating point errors.)

Show older