12.2 Setup
The basic structure of your application consists of two files and a directory. The entry point to the application is the index.js file located in the root directory of the application. In addition to this file, you need the package.json file, which can be used to resolve the dependencies of your application on the Node Package Manager (npm). It’s also located in the root directory of the application. The directory you create is named app and contains all the files required for the backend of your application to function correctly. When you start implementing your application, the first step is to create the package.json file using the npm init -y command. For the sample application, you need Express, Pug, and the websocket package. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access