Installing Socket.io

Before you can use the socket.io module, you will need to install it using npm. To do that, change your package.json file as follows:

{ "name": "MEAN", "version": "0.0.9", "scripts": { "tsc": "tsc", "tsc:w": "tsc -w", "app": "node server", "start": "concurrently \"npm run tsc:w\" \"npm run app\" ", "postinstall": "typings install" }, "dependencies": { "@angular/common": "2.1.1", "@angular/compiler": "2.1.1", "@angular/core": "2.1.1", "@angular/forms": "2.1.1", "@angular/http": "2.1.1", "@angular/platform-browser": "2.1.1", "@angular/platform-browser-dynamic": "2.1.1", "@angular/router": "3.1.1", "body-parser": "1.15.2", "core-js": "2.4.1", "compression": "1.6.0", "connect-flash": "0.1.1", "ejs": "2.5.2", "express": "4.14.0", ...

Get MEAN Web Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.