Conversation
|
Thanks. I know nothing about Go but have added your instructions to the README. |
|
I'll be happy to elaborate a little more if you'd like. When I get back to my computer, so I can do it properly. Seems like a good fit for this project as go can build a statically linked binary, so zero dependencies needed on the box it's running on. |
|
Alright, so, as promised I'm elaborating! Go is a language that compiles down to statically linked executables, and the stdlib includes some very useful packages for creating servers. In this case, it seems like a perfect fit as you're trying to create a simple and low-overhead application that does one thing and does it well. With zero optimizations, compiling a 32-bit version of the index.go file I submitted creates a 4.8MB executable that consumes about 3.3MiB of RAM on my home server. A couple of extra flags brings that down to a 3.3MB file that consumes 3.2MiB of RAM. Pretty much as easy peasy as you can get for a completely standalone server that can serve up your entire application. Throw in a few init scripts to help manage it as a service and you've got a completely self-contained service that will run on literally any linux machine with nothing else to install. |
|
Great feature ! Thank @tehbilly |
|
Hi. I'm getting this error from last version and your sample command line: |
|
It looks like that's no longer needed, try running it without that flag and it should work. |
Adding a very simple go server to the list. Primarily because when I went to test this out I could just run it via node without changing the listen port in
server/index.js. Plus, I'm not really a node guy!From the
serverdirectory you can run the following to have exactly what you have with the node version:However, I'd recommend just building the binary and running that.
Can use command line args to specify location of scripts/modules, listen address, and path for static files.