Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is process.json file in Node.js?

Tags:

node.js

It seems to be basic for you to answer but still I couldn't able to find out what is process.json file in Node.js and what it does, is that any file exists in Node.js ?

I went through one of the question on stackoverflow here in which process.json file is showing when installing npm modules.

Can you please answer me about the same that will be really helpful ?

like image 833
Ankit Uniyal Avatar asked Mar 22 '18 06:03

Ankit Uniyal


People also ask

What is process JSON file?

JSON (JavaScript Object Notation) is a popular data format used for representing structured data. It's common to transmit and receive data between a server and web application in JSON format. In Python, JSON exists as a string.

What is JSON file in node JS?

JavaScript Object Notation, or JSON, is a lightweight data format that has become the defacto standard for the web. JSON can be represented as either a list of values, e.g. an Array, or a hash of properties and values, e.g. an Object.


1 Answers

process.json is used for PM2 module of Node.js which is a General Purpose Process Manager and a Production Runtime for Node.js apps with a built-in Load Balancer.

PM2 empowers process management workflow.

Key features of PM2 are:

  1. Simple and efficient process management (start/stop/restart/delete/show/monit)
  2. Keep your application ALWAYS ONLINE with auto restarts and init system script generation
  3. Clusterize Node.js Applications without code change to increase performance and reliability
  4. Hot Reload Node.js Applications without extra configuration

Starting an application in production mode can be done using this simple command

$ pm2 start app.js

To dive into more details for process.json, you can refer this

like image 171
Adnan Avatar answered Oct 31 '22 23:10

Adnan