Thought it might be fun to dust this section off a bit. Not sure if anybody is actually interested in this and I did a lot of learning as I went, so I can't explain it well, but figured it could be interesting to share. I mentioned all my resources in my original post about it, the links there would probably be a better source of information than I am, and then you can also judge for yourself how frankensteined this is.
server.js
views/sketch.js*
package.json
views/index.html
I didn't include any of the other JSON because it's just RGB values for pixels upon pixels, but this is the bulk of what makes it work.
If for any reason you want to look at the whole thing, I have a remix of it you're welcome to look at, just let me know a ck-friendly glitch account and I'll invite you to view/edit it.
*I don't know why sketch.js was in `/views/` but I forked a sample project with p5js set up in glitch and that's how it was and I never bothered to move it even though that's not how I would personally have set it up.