Rezmason / matrix

matrix (web-based green code rain, made with love)
https://rezmason.github.io/matrix
MIT License
3.29k stars 212 forks source link

Instructions for running on localhost, or a server on my LAN? #34

Closed JamesDBartlett3 closed 1 year ago

JamesDBartlett3 commented 1 year ago

I'd like to run this code on either my localhost, or a server on my LAN, so it will work even when the internet is down or being flaky. Sorry for the stupid newbie question, but I read the entire readme file, and I couldn't find any instructions on how to run this program on my own machine. What am I missing?

Rezmason commented 1 year ago

That's fair @JamesDBartlett3, I've now added a clarification to the readme file:

This project runs right in the web browser; you can serve it from any HTTP/HTTPS server with no additional setup.

For instance, when I test it locally on my Mac, I just cd to my git repo and python3 -m http.server, like a chump. GitHub Pages is honestly more stringent than the environment I locally host it in, with its CORS and its relative path shenanigans. 😁

JamesDBartlett3 commented 1 year ago

Thanks for clarifying that. 😊👍

If I may make a suggestion, I think it would be very helpful if you included that "for instance" bit with the python command in your readme as well.

All of the open source web apps I've worked with so far came with their own dedicated launch commands, like npm start, yarn start, etc., so the idea that I could just throw this code into a directory, fire up any ol' web server daemon there, and point my browser directly at localhost didn't occur to me. I think I was expecting something more complicated. 😅

If you hadn't added that bit at the end, I think I'd still be scratching my head, though I'm probably a lot less savvy than most folks who find this repo and decide to play with it, so I dunno. 🤷‍♂️