Start the Node command-line parser and try JavaScript
using meta-commands in the Node parser
Write your first server program
var http =require('http');
http.createServer(function (req,res){
res.writeHead(200,{
'Contend-Type':'text/plain'});
res.end('Hello World\n');
}).listen(8124,"127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');
write fun apps
Create a chat server
var net = require('net')
var chatServer =net.createServer()
chatServer.on('connection',function(client){
client.write('Hi!\n');
client.write('Bye!\n');
client.end()
})
chatServer.listen(9000)