const server=require('node-http-server'); server.deploy( { port:4000, root:'./public/' }, serverReady ); function serverReady(server){ console.log( `Server on port ${server.config.port} is now up`); }