Configuration Alternatives

It is possible to use the same configuration as you would for the holochain Conductor, and pass it to the constructor for Conductor. The configuration may be a string of valid TOML, or a JavaScript object with the equivalent structure. To review the configuration, go here.

To see some examples of what these configuration files can look like, you can check out this folder on GitHub.

Using a Plain Old Javascript Object

const { Conductor } = require('@holochain/holochain-nodejs')
const conductor = new Conductor({
    agents: [],
    dnas: [],
    instances: [],
    bridges: [],
    // etc...
})

Using TOML

const { Conductor } = require('@holochain/holochain-nodejs')
const toml = `
[[agents]]
<agent config>

[[dnas]]
<dna config>

[[instances]]
...etc...
`
const conductor = new Conductor(toml)

Was this helpful?