how to write web apps in go
>>59871937
https://www.youtube.com/user/toddmcleod
>>59871970
that guy doesn't know what he's doing.
his videos are shit.
>>59871977
Then figure it out on your own.
Use Revel, look at the examples and read the docs.
>>59871937
read specs.
>>59871937
rtfm
Go is a systems programming language. You wouldn't write web apps in c++, why would you do it in go or rust?
>>59872371
Go comes with
- TLS
- HTTP1/2
- JSON
- URL parser
- Gzip, Deflate
- green threads
Yeah, don't know why people would want to write a web app in that programming language
>>59872371
>golang
>systems programming language
package main
import (
"io"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "Hello, World!")
})
log.Println("Listening on 0.0.0.0:8080")
log.Fatalln(http.ListenAndServe(":8080", nil))
}
>>59874146
Fuck, that is easy
Write it in lisp instead
>>59874146
localhost is 127.0.0.1 dumbass
>>59875360
0.0.0.0 is all addresses, retard
Avoiding frameworks is the way to Go. Go is a modern language that can handle such web related stuff out of the box. You will not find something well maintained with lots of contributors and a safe future like laravel, flask, django, expressjs etc. I should also warn you that if you have no experience it would be better to start with something else the fact that Go is the new kid on the block means that finding books, tutorials or online courses that are actually decent is almost impossible, to make things worse the idiots at Google chose an ungoogable name for it. If you can cope with all the above you will be able to harness the power, freedom and speed of Go.
>>59875938
I figured most people refer to it online as golang, which makes it easier to look up.
>>59875938
>Go is a modern language that can handle such web related stuff out of the box.
>You will not find something well maintained with lots of contributors and a safe future
this is a contradiction if net/http is all you need (and net/http is well maintained with lots of contributors. it isn't going anywhere)
>finding books, tutorials or online courses that are actually decent is almost impossible
godoc is pretty good
other resources: blog.golang.org, go-search.org, golangweekly.com, golangnews.com
https://dave.cheney.net/resources-for-new-go-programmers
(as an aside, dave cheney a bit of a know-it-all and regularly gets shit on by the Go team on twitter)
> to make things worse the idiots at Google chose an ungoogable name for it.
"golang" is the googlable term, there are lots of good results these days