magical inversion of control for nodejs