Does javascript implementation respect Ice.Config parameter?

smandysmandy Member Andy SmithOrganization: Self EmployedProject: Learning Ice

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

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    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"}));
    
  • smandysmandy Member Andy SmithOrganization: Self EmployedProject: Learning Ice

    Okay makes sense. Thanks for getting back.

    Cheers,

    A.

Sign In or Register to comment.