Conventions

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

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.251.128