Switching relay from NodeJS