O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

GopherJS examples

Earlier in this chapter, we got a preview of what coding with GopherJS looks like. Now we will take a look at some fully fleshed out examples to solidify our understanding of some basic concepts.

As mentioned previously, the source code for the front-end web application can be found within the client folder.

If you want to manually transpile the Go code in the client directory, you can issue the gopherjs build command inside the client folder:

$ gopherjs build

As mentioned earlier, two source files will be produced—the client.js JavaScript source file, and the client.js.map source map file.

To run the web server manually, you can go into the igweb folder and run the following command:

$ go run igweb.go

A more convenient ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required