start
start
is the function that will start a Shardus network after everything is all set up. Do not call this until everything from setup has been implemented and your API has been registered. setup
also needs to be called after registerExceptionHandler. This method takes in 1 parameter:
exitProcOnFail
is aboolean
that determines whether it will exit the program if an error occurs. The default behavior is to restart the node if an error occurs.
(async () => {
await dapp.start(true)
dapp.log('network started...')
})