Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to domain in nodejs

Tags:

node.js

As nodev4.2.1 is released and the domain is marked as the deprecated, so now I will require the alternative of it.

Earlier I used to store the request level variable in domain so that I can use those variables in the other processes of finding data within the same context of the request.

Is there any way where we can achieve it?

Note: I can not use request or response object to store my data.

like image 219
HDB Avatar asked Oct 15 '15 13:10

HDB


1 Answers

zone.js is something i believe can provide the solution: https://github.com/btford/zone.js/

it has much more capabilies

like image 184
sagie Avatar answered Sep 19 '22 08:09

sagie