Here is the code to controm servo with ESP8266 board. Here, the ESP32Servo is used, other than that, the code is pretty much the same.
Same can be achieved with standard Servo library:
Please read the disclaimer