Node JSIntro
Node JSIntro
cs6320
First what is MEAN
M = mongoDB -- lightly cover in this class
E = Express -- lightly cover in this class
A = Angular.js (client side) –will not cover
N=Node.js -- lightly cover in this class
FULL stack solution
What is node.js ?
Created 2009
"name": "helloworld",
"version": "1.0.0",
"description": "simple hello world app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "L. Grewe",
"license": "ISC",
"dependencies": {
"express": "^4.14.1"
}
}
Run your hello world application
Run the app with the following command:
$ node app.js
There are other alternatives than Express (the E in MEAN) like Sail, Meteor
Install express
install Express (if you want it, most will)and any
other dependencies needed
Now install Express in the myapp directory and save it
in the dependencies list. For example:
>$ npm install express --save
Express install
Will add files
to the node_modules
directory
HOWEVER…..I might suggest next learning about Meteor – less callbacks, more
subscription model than using MEAN