Your other problem could be because you're trying to send the whole HTML page at once - basically if you send the HTML straight down the socket in one go, Espruino needs the RAM for the HTML in the variable and for the HTML that's now in the socket's send buffer.
You can get around it by sending the string a bit at a time, or even just my using multiple files (eg put any JS in a separate JS file, and the same for CSS)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Your other problem could be because you're trying to send the whole HTML page at once - basically if you send the HTML straight down the socket in one go, Espruino needs the RAM for the HTML in the variable and for the HTML that's now in the socket's send buffer.
You can get around it by sending the string a bit at a time, or even just my using multiple files (eg put any JS in a separate JS file, and the same for CSS)