You are reading a single comment by @fanThomas and its replies. Click here to read the full conversation.
  • I have my own nodejs webserver and want to load my modules from this server. When I enter the following code on the right side of the Web IDE everything works hwever I get error messages like "Unexpected reserved word in http://192.168.88.117:8081/Wireless.js":­

    Transmit = require("http://192.168.88.117:8081/tran­smitClass.js");
    Wireless = require("http://192.168.88.117:8081/Wire­less.js");
    Switch = require("http://192.168.88.117:8081/swit­chClass.js");
    
    oWl = new Wireless('myAp', '192.168.88.117', new Switch());
    oWl.init();
    

    when I enter the command on the left side, the file is not found:

    Transmit = require("http://192.168.88.117:8081/tran­smitClass.js")
    Uncaught Error: Module http://192.168.88.117:8081/transmitClass­.js not found
     at line 1 col 65
    ....117:8081/transmitClass.js")
    

    The same happens, when I require such a module within the module:

      doTransmit() {
        console.log('Call Transmit');
        var url = 'http://'+this.wServer+':8081/transmitCl­ass.js';
        Transmit = require(url);
        this.oTr = new Transmit(this.wServer, this.mThing);
        this.oTr.init();
      }
    

    I do not understand this behaviour. Could somebody explain this to me?

    Thanks for all,
    Thomas

About

Avatar for fanThomas @fanThomas started