[root@awsstar ~]# mkdir example-node-server [root@awsstar ~]# cd example-node-server [root@awsstar ~]# yarn init yarn init v0.27.5 question name (example-node-server): example-node-server question version (1.0.0): question description: sample nodejs webapp question entry point (index.js): lib/index.js question repository url: question author: Nikit Swaraj question license (MIT): MIT success Saved package.json Done in 53.06s.
In the preceding output of execution of the yarn init command, we get some parameter where we have to fill some input from our end. After initiating the project, we will get a file called package.json.
package.json is a file where we can fill the dependency's name and build step or set some script to get executed. At this moment, we will see the parameter values, which we entered while initiating the project:
We will use some commands to build the application, which are dependencies. So, we have to tweak the package.json file by mentioning the dependencies and required scripts: