Chapter 2: standard and review edits

This commit is contained in:
Beth Griggs
2020-05-18 21:34:02 +01:00
parent adb2130b38
commit dc12070078
15 changed files with 115 additions and 119 deletions
@@ -1,13 +1,12 @@
const net = require('net');
const net = require('net')
const HOSTNAME = 'localhost';
const PORT = 3000;
const HOSTNAME = 'localhost'
const PORT = 3000
net.createServer((socket) => {
console.log('Client connected.');
console.log('Client connected.')
socket.on('data', name => {
socket.write(`Hello ${name}!`);
});
}).listen(PORT, HOSTNAME);
socket.on('data', name => {
socket.write(`Hello ${name}!`)
})
}).listen(PORT, HOSTNAME)