3 ms·
I would look at something like Echo. It’s minimal, but it offers some niceties over just using the standard library. Ultimately, creating a web endpoint is jus
by mdasen 8y ago
I would look at something like Echo. It’s minimal, but it offers some niceties over just using the standard library.
Ultimately, creating a web endpoint is just about parsing the request and writing out a response. That’s not to say the in-between is easy or isn’t easier with better tools. It’s just to note where the Go community sentiment against frameworks is coming from. With either the standard library or Echo, you’ll register a function with a route. The function will get a request object similar to Django and then you’ll call “r.Write” with the response you want to write out.
Of course, there are things like setting up your database connection that Django does for you that you’ll now have to do yourself and Django does nicely select some good tools. But Echo has add one to handle CSRF stuff and I think will even get you an SSL cert.
I’m on my phone right now, but I can write more later if you’re interested.
- sharmi 8y agoHi mdasen, I also looked at echo. There are also lots of discussions going on in go forums about how some frameworks work well with Go's Contexts and others don't. As a go newbie, it has kind of made me wary. So any write up from real experience is a boon. Thank you. I will be glad get your elaborate take. It will help me form a good understanding to build on.