Can you write for me in Node.JS, a server that listens on port 3000 and prints out a message when it succesfully connects?
system
kya aap mere liye Node.js main likh sakate hai, ek sarwar jo port 3000 par sunata he or jab yah safaltaapurvak conect hota he to ek sandesh print karata he?
user
neeche koi samasya nahin he, neeche Node.js code kaa ek udhaaharan he jo aapako ek sarwar banane kii anumati detaa he or phir port 3000 par sunne ke liye aage badhane ke saath -saath ek baar live hone ke baad ek sandesh print karen.

const http = aavashyaktaa ('http');

const sarwar = http.createserver ((req, res) => {
  consol.log ('anurodh kiya gaya');
});

// LocalHost 2nd tark ke liye difolt maan he
server.listen (3000, 'localhost', () => {
  consol.log ('port 3000 par anurodhon ke liye sunanaa');
});
assistant
<|system|>
</s>
<|user|>
kya aap mere liye Node.js main likh sakate hai, ek sarwar jo port 3000 par sunata he or jab yah safaltaapurvak conect hota he to ek sandesh print karata he?</s>
<|assistant|>
neeche koi samasya nahin he, neeche Node.js code kaa ek udhaaharan he jo aapako ek sarwar banane kii anumati detaa he or phir port 3000 par sunne ke liye aage badhane ke saath -saath ek baar live hone ke baad ek sandesh print karen.

const http = aavashyaktaa ('http');

const sarwar = http.createserver ((req, res) => {
  consol.log ('anurodh kiya gaya');
});

// LocalHost 2nd tark ke liye difolt maan he
server.listen (3000, 'localhost', () => {
  consol.log ('port 3000 par anurodhon ke liye sunanaa');
});</s>
