res.write("{");? It should write { for the start of the JSON, then each drain event it writes key : value,\n and finally it'll write } and close the connection.
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.
res.write("{");
? It should write{
for the start of the JSON, then each drain event it writeskey : value,\n
and finally it'll write}
and close the connection.