src/index.js
// creating a server with one page
creating a server with one page
creating a server with one page
function makeView(str) {
  console.log('starting server');
  http.createServer((req, res) => {
    res.writeHead(200, { 'Content-Type': 'text/html' });
    res.write(str);
    res.end();
  }).listen(8080);
}
function makeView ( str ) { console . log ( 'starting server' ) ; http . createServer ( ( req , res ) => { res . writeHead ( 200 , { 'Content-Type' : 'text/html' } ) ; res . write ( str ) ; res . end ( ) ; } ) . listen ( 8080 ) ; }
creating a server with one page
creating a server with one page