createServer itself returns an httpSrv class, which has a close method: http://www.espruino.com/Reference#httpSrv
createServer
httpSrv
So:
var server = require("http").createServer(...); ... server.close();
@Gordon started
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.
createServer
itself returns anhttpSrv
class, which has a close method: http://www.espruino.com/Reference#httpSrvSo: