Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Express-like framework for building APIs [closed]

Tags:

express

go

I have built some basic APIs with the node.js Express framework. I'm thinking of switching to Go, since callback code gets hard to reason about pretty quickly. I really like Express as a framework, is there something similar in Go?

like image 356
tldr Avatar asked Sep 08 '13 19:09

tldr


People also ask

Is Express used to create API?

ExpressJS is one of the most popular HTTP server libraries for Node. js, which by default isn't as friendly for API development. Using Express, we simplify API development by abstracting away the boilerplate needed to set up a server, which makes development faster, more readable and simpler.

Is Express a back end framework?

js, or simply Express, is a back end web application framework for Node. js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs.


2 Answers

The Gorilla Toolkit is great. In particular, you might want to look at github.com/gorilla/mux. Larger frameworks exist, but go users tend to opt for the simpler option, because the language and standard library get you quite far and a framework isn't as necessary to manage the complexity as it is in other languages and may just complicate things unnecessarily.

The API docs are a good reference and you can also check out examples of how other people use it.

like image 66
beyang Avatar answered Oct 11 '22 14:10

beyang


This maybe too late for you but I've been working on a clone of Express for Go. I claim it to be 90% complete so as long as it's the right 90% it could work for you.

Source: https://github.com/ricallinson/forgery Site: http://goforgery.appspot.com/

like image 22
Ric Avatar answered Oct 11 '22 14:10

Ric