4 ms·
What's easier about deploying Go vs with the JVM? Deploying stuff I've written in Clojure has been pretty easy.
by cgag 13y ago
What's easier about deploying Go vs with the JVM? Deploying stuff I've written in Clojure has been pretty easy.
- threeseed 13y agoIt's more your 'typical' Java app. Which is often the huge array of JARs and folder structure you typically need to bootstrap.
- cgag 13y agoMy understanding is you can just build an uberjar that contains all that, then just drop that jar on your sever and run it (java -jar myuberjar.jar).
- pallinder 13y agogo build It compiles a binary, just send it to the server and it will run, no need to even have go installed on the server (or any libs really).
- chc 13y agoDoesn't this require your development machine to use the same architecture and OS as your server?
- wtf_is_up 13y agoNo. It's simple to build Go toolchains for whatever your deploy os/arch target is. Then you just cross-compile. * Download Go source * Extract, cd go/src/ * GOOS=linux GOARCH=386 ./make.bash #this will build the linux_386 toolchain * GOOS=linux GOARCH=amd64 ./make.bash #linux_amd64 * GOOS=linux GOARCH=arm ./make.bash #you get the picture GOOS can be windows, darwin, freebsd, netbsd, plan9. Then when you want to cross-compile your app, you do: GOOS=linux GOARCH=arm go build myApp.go That's it. Now you have a statically linked binary that you can drop on whatever your target is. As someone who has had to cross-compile a lot of C and C++ code, I find this simplicity to be a huge win.
- chc 13y agoThanks for that. It's been a while since I used Go. That is quite nice.