Chapter 2: change back to use prettier

This commit is contained in:
Beth Griggs
2020-05-19 12:17:36 +01:00
parent dc12070078
commit 760ead3fda
15 changed files with 107 additions and 101 deletions
+10 -8
View File
@@ -1,12 +1,14 @@
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.')
net
.createServer((socket) => {
console.log("Client connected.");
socket.on('data', name => {
socket.write(`Hello ${name}!`)
socket.on("data", (name) => {
socket.write(`Hello ${name}!`);
});
})
}).listen(PORT, HOSTNAME)
.listen(PORT, HOSTNAME);