Ok, got it (honestly i haven't realized what the function E.on do, but anyway... at the moment is working).
E.on('init', function(){ var wifi = require("Wifi"); wifi.connect("ssid", {password: "password"}, function(err){if(err)console.log(err); else { console.log("connesso!"); var http = require("http"); http.createServer(function (req, res) { res.writeHead(200); res.end("Hello World"); }).listen(8080);}}); });
And after send the code, do a save(); to store the program from RAM to FLASH.
Thanks to everyone as pointed me to the solution. Marco
@MarcoM started
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.
Ok, got it (honestly i haven't realized what the function E.on do, but anyway... at the moment is working).
And after send the code, do a save(); to store the program from RAM to FLASH.
Thanks to everyone as pointed me to the solution.
Marco