I've the following promise which work well
troces.run(value, "../logs/env.txt")
.then(function (data) {
console.log(data);
return updadeUser(val, arg, args[1])
// Now here I need to add new method updateAddress(host,port,addr)
}).catch(function (err) {
console.error(err);
});
Now I need to add additional method call inside the the first .then
that the update user and the updateAddress
will work together
My question are
assume that updateUser will need to start 10 ms after the update address How is it recommended to do so?
in aspects of error handling if one of the process failed (send error message ) I Need to exit (
process.exit(1);
)