I have done a node.js server install and checked the node --version
in the command prompt
I have done this much but I couldn't stat the npm.
I have done a node.js server install and checked the node --version
in the command prompt
I have done this much but I couldn't stat the npm.
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
Install MongoDB, Configure and Run - Download MongiDb installer and install MongoDB on your computer. Follow the screen instructions. Read installation guide for windows here
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
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.
Install express - To install express type npm install express --save
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.)
Install AngularJs - Run bower install angular --save
command to install angular
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!') })
Run node index.js
. Your website is now running on http://localhost:3000.
Please read some tutorial here to get more information
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