You are reading a single comment by @MarcoM and its replies. Click here to read the full conversation.
  • Hi tve, digging a little bit into the documentation i've found that save() save the code on the flas after (not before) the code i wrote, is it right? Is it bettor to use E.on('init',function()) instead of save?
    What i'm expecting is to try to save the code inside the flash so next time the esp boot it will read the code i wrote (i'm a little bit confused about this, because i understand that when the esp boot read immediately the espruino firmware and the javascript interpreter so the code need to be readed after the firmware... sorry if it can be stupid but i'm trying to understand how it works)

    so now writing save(); before the code i've got this error:

    Erasing Flash.....
    Compressed 12276 bytes to 703
    CheckUncaught SyntaxError: Got '(' expected ID
     at line 1 col 10
    function (req, res) {

    and to reply to your question, if i type reset()

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
     1v84.tve_master_588d193 Copyright 2015 G.Williams
    WARNING: the esp8266 port is in beta!
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016

    another strange behave that i found is when the ide send the code to the esp (without trying to save) i receive a warning message that "the module http is not found" but the webserver work.
    Many thanks.


Avatar for MarcoM @MarcoM started