Part 1: Server Setup
Here you will find a step by step tutorial on installing Leia WebGL SDK and dealing with server configuration. This tutorial assumes you do not yet have npm in your project and you do have your static html and js and other files in public/ subdirectory
Setup
To get started, you need to initialize your npm:
Now we need to install a server. In this example, we will use express:
Example server app script. Our example is named node server_app_script.js and was saved in project root directory.
Running the Server
You can run the server either through a node command
Or you can add the command to your package.json:
And then run server like this:
Integrating Leia WebGL SDK
Full server script:
Note the following line from the script above configures our server to reference the Leia WebGL SDK. Without this reference, we will get error message 'RenderController is not found':
Last updated