SiteCozy

  • My account

How to create a nodeJS project?

2018-09-20

Install NPM & NodeJS

Choose a folder where you want to start your NodeJS project. Then, open the terminal and go to the folder where you want the NodeJs project. Then type “npm init”. You will get the following text. Enter the right information for each package.json items and press enter.

This utility will walk you through creating a package.json file.

It only covers the most common items, and tries to guess sensible defaults.

See npm help json for definitive documentation on these fields
and exactly what they do.
Use npm install <pkg> afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (statemag)
version: (1.0.0)
description: State management
entry point: (index.js)
test command:
git repository:
keywords:
author: Me
license: (ISC)
About to write to /Users/jojo/js/statemag/package.json:
{
"name": "statemag",
"version": "1.0.0",
"description": "State management",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Me",
"license": "ISC"
}
Is this OK? (yes)

Now, open a text editor or code editor and name your file index.js. You are ready to create your nodeJS project.

Related Posts:

  • How to fix the cyclic dependancy error in nodeJS/mongodb
  • How to install nodeBB on ubuntu
  • How to install nodeBB on centos 7
Download our Broken link checker freeware here Buy a license key for the Sitecozy broken link checker

Customer Login

Lost password?

Categories

  • Webmaster advice
  • SEO advice
  • Web hosting
  • SiteCozy link checker KB
  • WordPress theme & plugin reviews
  • All articles
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Copyright Sitecozy 2018