Being primarily a mobile developer I don’t get a lot of exposure to writing production back-end code, so I’m trying to be proactive and develop skills through personal projects. I think it’s important that mobile developers don’t limit themselves to just front-end work. It’s very powerful to be able to spin up a microservice to wrap a bad API endpoint and transform it into a good one.
I’ve only previously dipped my toe into the world of microservices using node.js and python but i’ve read a lot of lovely things about Go, and wanted to try creating something myself.
With just a few lines of code you can spin up an endpoint and return the infamous
To deploy this to a server you first use
go build to create a binary file. This will output an executable called
main that we can then use to execute. That’s it. (You can tweak the compilation options to build for different architectures)
Building on this I recently added RSVP functionality to my wedding website using Go. You can find a post on how I achieved that here.