If you stick the Web server creation into an onInit() { ... } function, you should be fine.
var WS = require ("WebServer"), ws;
function onInit() {
ws = new WS (...
...
}
This way, of course, your Web server will not star on upload of the code... You start it by entering onInit() in the console. When done with development, save() the code, and any reset and repower will do fine too.
Take a look at 2 cents details in conversation about saving code.
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.
If you stick the Web server creation into an
onInit() { ... }
function, you should be fine.This way, of course, your Web server will not star on upload of the code... You start it by entering
onInit()
in the console. When done with development,save()
the code, and any reset and repower will do fine too.Take a look at 2 cents details in conversation about saving code.