Right, thanks to your feedback, this is what the “hello, world” would look like in htmx versus the equiavelent of what I have now in Svelte.
But there’s one big drawback to htmx… no ES modules and thus no components. That’s a biggie.
Right, thanks to your feedback, this is what the “hello, world” would look like in htmx versus the equiavelent of what I have now in Svelte.
But there’s one big drawback to htmx… no ES modules and thus no components. That’s a biggie.
Question to JavaScript folks who have experience with Node.js… how does the following (theoretical) code listing for a server-side route that renders an index page with a count that’s persisted in memory on the server and updated any time someone loads the page read to you?
Just moved NodeKit over to @codeberg from G****b.
Old: https://github.com/small-tech/nodekit
New: https://codeberg.org/nodekit/app
Will be moving all my other currently active projects over as well in the coming days.
Bun (a new JS runtime ala Node.js and Deno) sounds interesting. Not least of all because it doesn’t use V8.
(I can’t use it for NodeKit at the moment as it doesn’t support custom ESM loaders but I’ll be keeping an eye on it.)
Anyone fluent with tree sitter grammars (and/or LSPs) want to help me with implementing NodeKit (https://github.com/small-tech/nodekit) code intelligence for Helix editor?
Node’s built-in error reporting leaves a lot to be desired so I just spent some time improving the error output for NodeScript runtime errors in Nodekit (https://github.com/small-tech/nodekit#readme)
Phew, finally merged my “major refactor” NodeKit branch into main. The previous main branch is now archived in the prototype branch.
Only production mode is functional right now but it’s a maintainable codebase (not like the jumble the prototype was as I was working to get things working for the first time).
Also: So. Little. Code.
Now to add more tests and the development mode server functionality as I go.
Yay, progress!
Yay! WebSocket routes (and the simple chat example) are working again too :)
w00t, just got the major refactor branch of NodeKit (https://github.com/small-tech/nodekit) running the Hello Count example for the first time.
Been refactoring the hell out of NodeKit recently to take it from prototype to maintainable app.
Nice to have a little win.
Now to find all the other things that are no doubt broken :)
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
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.
If you want to play with it yourself, I just checked in the code here:
https://github.com/small-tech/nodekit/blob/main/examples/streaming-fediverse-posts/index.page
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.
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:
https://github.com/small-tech/nodekit/tree/main/examples/make-fetch-happen
Run `nodekit` on that folder, get the result in the browser.
No scaffolding. No configuration. No bundlers.
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?