init

init(url = 'https://scheduler.distributed.computer', autoUpdate = true[, bundleLocation])

Asynchronously initialize the dcp-client bundle for use by the compute API, etc.

Arguments:
  • url (string|URL) – Scheduler URL location, defaults to https://scheduler.distributed.computer. Should never need to be changed except by internal devs or those with seperate schedulers.

  • autoUpdate (boolean) – Automatically update the dcp-client bundle, defaults to true. Disable to keep tight dependency control.

  • bundleLocation (string) – Bundle location to download during auto updating. Defaults to most up to date dcp-client bundle, only change if a particular dcp-client version is strictly required.

Return type:

A promise which resolves to an instance of a DCP object.

Example:

async function main() {
  /* DCP App ... */
}

require('dcp-client').init().then(main);

Tutorials: