node.js package.json example

package.json serves as a configuration for your nodejs module. The name and version fields are required. This file usually placed in the root directory of your nodejs application folder. When you do the install command (npm install) in the root directory, it needs the package.json file in the same location. For example, with this package.json, it will install 3 dependency modules, async, express and mysql because they are specified in the dependencies property.

	"name": "nodejs-pkg",
	"version": "1.0.0",
	"description": "An example of nodejs package.json",
	"author": "Jack <>",
	"dependencies": {
		"async": "",
		"express": "",
		"mysql": ""
	"private": true,
	"analyze": true,
	"license": "MIT"

Search within Codexpedia

Custom Search

Search the entire web

Custom Search