ESP8266 Node MCU 12E Tx Rx Serial Communication with MEGA

HI there I have been working on small HOme automation project , i have few Item connected to My Mega and works beautifully , Now I am trying to integrate the ESP8266 12 E Node MCU dev kit with the project , I successfully created a web server from which i can connect few LED switch them on and off ,

However I want to take that On cmd from web page to be sent via rx tx pin to serial comm of arduino ( I already have logic level shifter in place and )

How do i send data over the serial port of ESP8266 of NODE MCU DEV KIT to Arduino MEGA

vinayharne: I successfully created a web server from which i can connect few LED switch them on and off

Is this implemented solely on the ESP8266 or is the ESP8266 connected to the Mega and the Mega is switching the LEDs?