Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const http = require('http');
- var count = 0
- http.createServer( function(request, response) {
- console.log('Hello World' + count);
- count++;
- console.log(request.url);
- response.writeHead(200, {'Content-Type' : 'text/html'});
- // response.end('<h1>Count ' + count + '</h1>');
- response.end( JSON.stringify({name: 'Mao', age: 25}), null, 4 );
- } ).listen(3000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement