Sharing data between node.js and a processing sktech

Is it possible to share data between a processing sketch and a node.js server (running on the same machine)?

Yes, but you need some type of IPC (inter-process communication) mechanism to send data between processes.

In the Node.js world there's a popular program named Redis. It implements the publish/subscribe pattern. A process subscribes to a channel (aka, the reader) and another process publishes to that channel (aka, the writer).

In the node.js side you can use the node_redis client. In the processing sketch side you can use any of these clients depending on the language you're using.