There should be a node.js module that integrates with express that browserifies modules "on the fly" (with caching) so that the client side code experience doesn't have to change and I don't need to "compile" my client JS files.

Then I could just include whatever module I want via a <script> tag and it'd happen automatically.

A circular buffer isn't worth all of this as it's pretty trivial, but will I want more modules like this in the future? Should I keep this setup? I DON'T KNOW!

Ok I configured express to serve the javascript file for the circular buffer directly from the node_modules directory, but it doesn't work because the there are node.js keywords like "module" in the source code which the browser doesn't like.

This led me to browserify which I got working, except now I have to "compile" my Javascript before I refresh the page in the browser and this feels all sorts of wrong.


Somehow, made this magic happen. When I set this up initially following a tutorial, all I had to do was add this to the index.html for client side to work:

<script src="/"></script>

Magically the browser found the file. I guess it must have configured express for me when I included it on the server side script?

Probably stupid node.js/javascript/web question!

So "npm" installs modules and things that the node.js server can use, right? (I've installed a couple already and used them in my server.) How do I do that for the client/browser side of things?

Specifically, there's a circular buffer node.js package and I can install it with npm but I want to use it on the browser side and not the node.js server side. Is that a thing that there's some magic config for? I'm using Express if that matters.

Nothing like spending an hour screwing around with Visual Studio Code to get it to use SF Mono Regular as the font with a color scheme as close to Xcode as possible... 😛

I just made a node.js server and managed to use for the first time. I haven't done any web stuff since before node.js or or even Chrome existed, so I consider this a kind of achievement. Or something. Web dev still makes me feel dirty, though.

Sean Heber boosted

I'm lucky to work with some wonderful people at Panic in downtown Portland (across from Powell's Books). Right now, we're looking for a Web Services Engineer to join us! I made this nice little video and everything. Check it out, if you're into web services, or maybe pass it on to someone you like?

politics and death Show more

Saw a guy wearing an "ugly sweater" t-shirt which seems to defeat the point.

We released a new version of our drawing app Linea today (both Sketch for iPad and Go for iPhone) with some cool new features! Artfolk might be interested in checking it out:

I have to drive 12+ hours tomorrow and I have no idea how I’m going to get all of my steps. 😟

Show more

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!