fun <T> nodejs(body: NodeJSAPI.() -> T): T
Enters the NodeJS event loop thread and makes the JavaScript API available in scope. You can return JavaScript objects from a nodejs block, however, you can't access them again until you're back inside. Attempting to use them outside a nodejs block will trigger a threading violation exception.
Note that this function schedules the lambda onto the NodeJS event loop and waits for it to be executed. If Node is busy, it'll block and wait for it.