• Hi all, once I created a web server using

    require("http").createServer
    

    Which function should I call to close it? Thanks.

  • createServer itself returns an httpSrv class, which has a close method: http://www.espruino.com/Reference#httpSrv

    So:

    var server = require("http").createServer(...);
    ...
    server.close();
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Which function call of http module to close the created http server?

Posted by Avatar for Unreality @Unreality

Actions