- Don't connect a relay directly to a GPIO since it can only deliver around 12mA and a relay (almost) always need a multitude of that. Use a switching transistor in between.
- Don't connect a relay (or any low resistence component) to GPIO0, GPIO2 or GPIO15 (D3, D4 or D8 on the NodeMCU) since these are needed to properly boot the ESP.