What is the best way to achieve a Flash/Unity app with shared Nodejs server?

Over the last week or so I have been looking into creating a shared nodejs server that has flash and unity interfaces. I’m still rather new to nodejs so this is a post to ask a question; I’m considering creating a JS file that flash and unity communicate to using external interface calls instead of putting the communication layer inside of the application.

My question is, is this an acceptable approach? One of the reasons I’m considering this is because it seems to be a pain in the ass in Unity to achieve this.

Let me know what you guys think!