Friday, December 9, 2016

postgis_express


start express server:

cd your app folder

npm install                -------- this is install dependency

npm start

localhost:3000 should work.


=================================

$ npm install -g express --save
-g install globally
means, express lib will be installed at
C:\Users\engcid299\AppData\Roaming\npm

You must add above path to Either user environment variable path or system environment variable path.

otherwise, get error
'express' is not recognized as an internal or external command,

Mac:
 same, add to path
export PATH=/usr/local/share/npm/bin:$PATH


================================

visual studio code:

add, C:\Program Files (x86)\Microsoft VS Code
to path  (user environment variable)


Mac:
same add to path

After installation, launch VS Code. Now open the Command Palette (⇧⌘P) and type shell command to find the Shell Command: Install 'code' command in PATH command.
enter image description here




open project
cd your app foler
code .

ctrl + `  open integrate terminal



======================================

Press Ctrl + C twice to exit nodejs.


================================================

Express application generator


$ npm install express-generator -g

create myapp(your project name)
$ express --view=jade myapp

install dependence
$ cd myapp
$ npm install
> set DEBUG=myapp:* & npm start

Then load http://localhost:3000/ in your browser to access the app.



==============================
netbean create new node.js project

cd to that directory,

--save will add express dependancy to package.json

npm install restify --save
=================================







======================
netbean create new node.js project

cd to that directory,

--save will add express dependancy to package.json

$ npm install express --save

No comments: