March 2019
Beginner to intermediate
324 pages
7h 17m
English
We now have enough knowledge to start exploring the commands provided by GopherJS in order to compile Go code into JavaScript. For any GopherJS command you run, make sure the GOOS flag is set to either darwin or linux. If you are running on Windows, you'll need to run the following command from the Terminal session expected to run GopherJS's commands:
set GOOS=linux
Here is what we need to do next—let's start by getting an environment ready. After installing GopherJS and the source-map-support module, as covered earlier in GopherJS fundamentals section, create a new folder inside your Go src folder that is in your GOPATH. Let's name the new folder 9-Isomorphic-GO. Inside the new folder, create another folder called node ...
Read now
Unlock full access