I am trying to toggle an LED using ESP8266-01 by sending POST from my laptop (using node.js)
I now have a memory issue because whenever I send POST request, the memo
Your on sent callback should accept one parameter, a connection. And you should setup the on sent handler at the same level as on receive -- conn that's passed to on receive is not necessarily the same conn passed to srv:listen.
Lastly, redundant copies of string literals is a waste of memory, (though that likely won't cause it to leak.)