0

I have done a node.js server install and checked the node --version in the command prompt

enter image description here

enter image description here

I have done this much but I couldn't stat the npm.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Getting MEAN with Mongo, Express, Angular, and Node SIMON HOLMES ,I'am referring this pdf –  Jul 13 '17 at 05:36

2 Answers2

0

It seems you have installed nodeJs already on your computer. But I will explain step by step how to setup a project with MongoDb + express + Angular + NodeJs

  1. Install MongoDB, Configure and Run - Download MongiDb installer and install MongoDB on your computer. Follow the screen instructions. Read installation guide for windows here

  2. Install NodeJs - Download and install NodeJs. Open command prompt and type "node -v", if this command runs without an issue, that mean you have installed NodeJs on your computer

  3. Setup a project - Create a empty folder. Open command prompt and go inside the folder. Now type npm init. Provide answers for questions prompt in command prompt. Once you complete that you can see package.json file is created in your folder.

  4. Install express - To install express type npm install express --save

  5. Install bower package manager - Run npm install -g bower if you don't installed bower before on your computer. (Bower is a package manager for font end websites.)

  6. Install AngularJs - Run bower install angular --save command to install angular

  7. Create a NodeJs Server - Create a file index.js. This will be an entry point of your nodeJs app

    const express = require('express') const app = express()

    app.get('/', function (req, res) { res.send('Hello World!') })

    app.listen(3000, function () { console.log('Example app listening on port 3000!') })

  8. Run node index.js. Your website is now running on http://localhost:3000.

Please read some tutorial here to get more information

Nuwan.Niroshana
  • 407
  • 4
  • 15
  • C:\jeevan>npm init 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 ` 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: (jeevan) jeevan version: (1.0.0) 1 Invalid version: "1" version: (1.0.0) –  Jul 13 '17 at 07:19
  • Javeen, Version should be something like 1.0.0. Please read more about software version https://stackoverflow.com/questions/2791121/what-every-digit-means-in-software-version-1-7-1-0-for-example – Nuwan.Niroshana Jul 13 '17 at 08:01
  • npm install -g express-generator and after create new folder and command promt 1.express ,2.npm install ,3.npm start its worked. i used like this my issue fixed –  Jul 14 '17 at 11:29
0

If you have every thing installed (Mongo,Node) then you can try yeoman application generator.It will create a sample application for you with all the required folders and you just need node modules and bower components to install.

Please read this here:- http://yeoman.io/

You don't need to bother any thing for any of your folders

Atul Agrawal
  • 1,474
  • 5
  • 22
  • 41