I have read many threads related to this but they are a little bit old now, that's why as Domain
is still Deprecated
till now has anyone found any other good alternative
to using Domain
or not ??
I read this post alternative-to-domain-in-nodejs and there i found zone.js, does anybody use it as domain alternative or not ?? Because as the last commit on this library was 3 years ago that's why I don't think it will be a reliable solution ??
Domain isn't deprecated yet, it's pending deprecation; it won't be propery deprecated until there's a replacement. From the documentation:
This module is pending deprecation. Once a replacement API has been finalized, this module will be fully deprecated. Most end users should not have cause to use this module. Users who absolutely must have the functionality that domains provide may rely on it for the time being but should expect to have to migrate to a different solution in the future.
Note that last bit:
Users who absolutely must have the functionality that domains provide may rely on it for the time being...
So in terms of a replacement: Watch that page. The new API will be announced and the deprecation notice updated, presumably.
zone.js now move to angular package, you can found it here, https://github.com/angular/zone.js.
And it can work in node.js
, you can find detailed information here.
https://github.com/angular/zone.js/blob/master/MODULE.md https://github.com/angular/zone.js/blob/master/NON-STANDARD-APIS.md
you can try the new version, zone.js
provide some features that domain
doesn't have. please tell me when you need more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With