Freelance Web Developer

Static Web Hosting, made easy

Sep 12, 2014

RESTful API for MySQL in Go

Most of the mobile and webapp uses REST APIs these days. Client side code uses CURD operations to READ, WRITE, UPDATE and DELETE etc.

The backend of REST APIs can be written with GO ( golang ).

You can use http.NewServeMux() to handle path and to decide what to serve.

http.HandlerFunc can define which function will handle the http.Request

In this function we can check what type of request.Method it is, code can act accordingly ( READ, WRITE, DELETE or UPDATE database) and write back the output (in JSON) to

I have shared the code on Github / motyar / restgomysql Feel free to fork and improve.

You can discuss more on Reddit here


By :