Golang Angularjs Tutorial part 2 - Websockets

preview_player
Показать описание
In this tutorial we create a chat service using Golang, Angularjs, and websockets.

This is where we start getting into the power of Go. Since it has concurrency built right into the language it's very easy to understand what is happening.

All the code:
Рекомендации по теме
Комментарии
Автор

Holy crap, this was so useful. Thanks Jake!

yelnil
Автор

Thx for posting, I am looking at transitioning my Angular projects to using Go at the backend for many good reasons. This may be the worlds first Go + Angular tute ! Looks like Go + angular works together quite smoothly.  Am imterested to see how easily Go can handle angular partials via XHDR request - especially with ui-router at the front end. Will find out tonight after I get to play with it ;) Thx again.

steveoc
Автор

if you wonder why you can't type in duplicates add this
<li ng-repeat="m in messages track by $index">{{m}}</li>

And thanks for these tutorials :) They are really helping

christianenevoldsen
Автор

Can you please compare golang with node js with and example and share us a video, it will help better

satyaece
Автор

Great tutorial, thanks!

Why does the connection map need to be declared in main when it's not even used? It can't be done outside of main?

nathanhyland
Автор

if this were in production would you have some way to encrypt the connections and messages, e.g. SSL or somesuch?

groovewhiz
Автор

Anyone know why if i made a mistake on one file, I update it, yet the webservers serves the old file. Pretty sure it is the webserver since i tried in a different browser and the old file is served. I'm puzzled

ResidentBio
Автор

I noticed that you'll probably get an so called "race condition". Protecting the map of connections using the Sync-package is a great idea.
Use the Sync.Mutex in every function where you use the map concurrently.
Otherwise, keep up the good work :)

lillthors