Creating a Package

Create a directory on your machine somewhere called databases. We’ll use this directory for all programs, data files, and examples from this chapter. Next, open an editor and enter the following:

databases/package.json
​ 
{
​ 
"name": ​"book-tools"​,
​ 
"version": ​"0.1.0"​,
​ 
"description": ​"Tools for creating an ebook database."​,
​ 
"author": ​"Your Name <you@yoursite.com> (http://yoursite.com/path)"​
​ 
}

Save this file in your project directory as package.json.

In a Node.js project, the package.json file describes many aspects of the project and its dependencies.[19] This short example includes only the basics: the project’s name, version, short description, and author. For your own projects, ...

Get Node.js the Right Way 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.