Weavy options

Typically, adding the Weavy client SDK to your application or website is enough to get you started. But you probably want to tweak the default options a bit to make your Weavy behave the way you want it to.

Using options

Specify options by passing an object with properties when constructing the Weavy instance. By default, the url option is set to your installation, but you can override it to point to a development server for instance.

    var weavy = new Weavy({
        url: '{weavyurl}',
        jwt: '{server_generated_jwt_token}'

Available options

urlThe url string to the weavy server for the client to connect to.
jwtJSON Web Token for Single Sign-On (SSO).
idThe string id of the weavy instance. This option is automatically set unless you specify it.
initSets whether the weavy instance should initialize directly. Defaults to true. Set it to false and call weavy.init() to initialize at a later point.

Default options

The default options are stored in an object as a property called defaults on the Weavy class. You can read or set these options before you create a new Weavy instance. The defaults will be applied on all Weavy instances unless other options are specified.

Avoid putting the jwt token in default settings, since it's only valid for a limited time and should be consumed when passed to the server.
    Weavy.defaults.url = '{weavyurl}';
    var weavy = new Weavy();