1. Node Js
- What is Node Js?
Here is how PHP or ASP handles a file request:
- Sends the task to the computer's file system.
- Waits while the file system opens and reads the file.
- Returns the content to the client.
- Ready to handle the next request.
Here is how Node.js handles a file request:
- Sends the task to the computer's file system.
- Ready to handle the next request.
- When the file system has opened and read the file, the server returns the content to the client.
Node.js eliminates the waiting, and simply continues with the next request. Node.js runs single-threaded, non-blocking, asynchronously programming, which is very memory efficient. Node.js can Do following task:
- Node.js can generate dynamic page content
- Node.js can create, open, read, write, delete, and close files on the server
- Node.js can collect form data
- Node.js can add, delete, modify data in our database
package.json
file
that follows the semantic versioning specifications.Semantic Versioning is a 3-component number in the format of a.b.c, where :
- a stands for a major version.
- b stands for a minor version.
- c stands for a patch.
Working : The goal of semantic versioning was to bring some sanity to the management of rapidly moving software release targets. As discussed above, 3 numbers i.e, Major, Minor and Patch are required to identify a software version. For example, if we take version 5.12.2, then it has a major version of 5, a minor version of 12 and a patch version of 2. Below given are the scenarios when we should bump the value of a, b and c.
- Bump the value of a when breaking the existing API.
- Bump the value of b when implementing new features in a backward-compatible way.
- Bump the value of c when fixing bugs.
What does
package.json file consist of?
It consists of two properties:
Identifying
metadata properties |
Functional
metadata properties |
It
basically consist of the properties to identify the module/project such as
the name of the project, current version of the module, license, author of
the project, description about the project etc. |
As
the name suggests, it consists of the functional values/properties of the
project/module such as the entry/starting point of the module, dependencies
in project, scripts being used, repository links of Node project etc. |
Creating a package.json file:A package.json file can be created in two ways:
1. Using npm init : Running this command, system expects user to fill the vital information required as discussed above. It provides users with default values which are editable by the user.Syntax:
npm init
2. Writing directly to file : One can directly write into file with all the required information and can include it in the Node project.