Noob wiring/software help for esp8266

well it did mate dont know what to tell ya, im also using d4 instead of d2 which is what @cattledog labelled. If you copy exactly what i did in my diagram the light turns off instead of on when i flick switch however if i do what @cattledog did but use d4 not d2 it has intended effect of turning on when i flick