void start()

This method has five overloads. The first overload is for Node.js programs and the rest can be used in Node.js programs and web pages.

  1. start(Object context[, JSON Object options])
  2. start(Object context, DOMString unique_name)
  3. start(Object context, DOMString Array unique_names)
  4. start(Function callback, DOMString unique_name)
  5. start(Function callback, DOMString Array unique_names)
Parameter Description
context The context is an object implementing start and fail methods.
callback User defined callback function that is called after the operation is finished.
unique_name Unique name of an application or a spacelet.
unique_names An array of unique names of applications.
options An JSON object containing options for customizing startup.

The overloads

1. start(Object context[, JSON Object options])

This overload is only for Node.js programs. The method is used to start applications and spacelets. The method does the following operations when it starts an application or a spacelets:

  1. Loads manifest.
  2. Creates servers for the provided services.
  3. Registers the provided services.
  4. Connects to the required services.
  5. Starts HTTP and HTTPS web servers. The web servers are not started by default.
  6. Calls the start method of the context on success and the fail method on failure.

The options contain now only properties for controlling the starting of the web servers.

  http: Boolean,
  https: Boolean,

The http and https properties take only boolean values. If the particular web server type is wanted to be started the property must have value true and false if not.

Overloads 2., 3., 4. and 5. are aliases of the connect method. See its documentation for more information.

copyright © 2014