Transpiling the client-side application

Now that we've set up the $IGWEB_APP_ROOT environment variable, we can access the client directory, where the client-side web application is located:

$ cd $IGWEB_APP_ROOT/client

We issue the following go get command to install any additional dependencies that may be required for the proper functioning of our client-side application:

$ go get ./..

Finally, we issue the gopherjs build command to transpile the IGWEB client-side web application:

$ gopherjs build

After running the command, two files should be generated—client.js and client.js.map. The client.js source file is the JavaScript representation of IGWEB's client-side Go program. The client.js.map file is the source map file that will be used in conjunction with client.js by the web browser to provide us detailed information in the web console, which comes in handy when debugging issues.

Now that we've transpiled the code for IGWEB's client-side application, the next logical step would be to build and run IGWEB's server-side application. Before we can do that, we must install and run a local Redis instance, which is what we'll do in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.107.254