Which ESP8266 board are you using ?
#define DHTPIN 8
Which pin have you got the sensor connected to ? Is it pin 8 of the ESP8266 or pin D8 of the board ?
Which ESP8266 board are you using ?
#define DHTPIN 8
Which pin have you got the sensor connected to ? Is it pin 8 of the ESP8266 or pin D8 of the board ?