Archived

This forum has been archived. Please start a new discussion on GitHub.

Does javascript implementation respect Ice.Config parameter?

Looks like Ice.initialize( [ '--Ice.Config=/path/to/config'] ) doesn't load my config file when running under node. The resulting communicator has a property Ice.Config set to the path specified.

Is this to be expected?

Cheers,

A.

Tagged:

Comments

  • xdm
    xdm La Coruña, Spain

    Hi Andy,

    This is a limitation of the JavaScript mapping, the properties class doesn't allow to load config files, that was to keep browser and NodeJS working the same way.

    You can use the internal API to pass the contents of the config file, but being an internal API it could change over time.

    var properties = Ice.createProperties();
    properties.parse(require("fs").readFileSync("client.config", {encoding: "utf8"}));
    
  • Okay makes sense. Thanks for getting back.

    Cheers,

    A.