In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: " The first will be keyed with the value of action
and the second will have a key of data
."
A block of code is set as follows:
wss.on('connection', function connection(ws) { board.on(Board.events.PLAYER_CONNECTED, function(player) { wss.clients.forEach(function(client) { board.players.forEach(function(player) { client.send(makeMessage(events.outgoing.JOIN_GAME, player));
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
validator.isEmail('[email protected]'), //=> true validator.isBase64(inStr); validator.isHexColor(inStr); validator.isJSON(inStr);
Any command-line input or output is written as follows:
npm install socket.io --save npm install socket.io-client –save
3.14.251.128