9

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.

HDB
  • 782
  • 2
  • 7
  • 18

1 Answers1

2

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

it has much more capabilies

sagie
  • 1,744
  • 14
  • 15
  • Thanks Sagie for the solution. But can I write the different context-storage module? Where should I put the variables in this case? Can I use process to input the data? – HDB Oct 16 '15 at 11:52
  • 3
    Its unclear if this project is moving forward at all. The implementation status is patchy, and there have been no commits for nearly a year now. – DomA Nov 12 '15 at 09:43
  • Maybe so, but if it's working good and provides you the features you need than I don't an issue. – sagie Nov 12 '15 at 16:57
  • ZoneJS does not support native async/await, so pretty much useless in modern Javascript. – Marc J. Schmidt Dec 14 '20 at 17:44