Sorry, that's totally my fault - a copy/paste error. You actually needed:
var info = {ip:"192.168.1.9"};
wifi.setIP(info, (err) => {
})
So without the extra getIP in there. I think if you do that it should be ok. I guess you might find you need to specify the gateway/netmask in setIP (https://www.espruino.com/WiFi#reference) but for a server I don't think that's really needed.
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.
Sorry, that's totally my fault - a copy/paste error. You actually needed:
So without the extra
getIP
in there. I think if you do that it should be ok. I guess you might find you need to specify the gateway/netmask in setIP (https://www.espruino.com/WiFi#reference) but for a server I don't think that's really needed.