adding hook for node client embedding to main.js