Starting with a package.json file

In this chapter we have adopted a different way to start our application; as we have seen in a previous chapter, let's build a Node.js application step by step without the command line.

Let's create the package.json file with application dependencies:

  1. Create a folder called chapter-07.
  2. Create a file called package.json within chapter-07 and add the following code:
     { "name": "chapter-07", "description": "Build a real time chat application with Node.js and Socket.io", "version": "0.0.1", "private": true, "scripts": { "start": "node app.js" }, "dependencies": { "body-parser": "^1.13.3", "cookie-parser": "^1.3.3", "ejs": "^2.3.1", "express": "^4.13.3", "morgan": "^1.6.1", "serve-favicon": "^2.3.0", "socket.io": "^1.4.6" ...

Get Node.js 6.x Blueprints 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.