Posts

Showing posts from 2016

Node Commands

# How install specific node version on Ubuntu -  https://github.com/nodesource/distributions/blob/master/README.md  npm commands:  npm init - To initalize the package. This will create package.json on the fly  npm install - This will look for package.json and install all the listed packages npm insall -g <package name> - To install packages globally npm install --save <package name> - To install packages locally, as well as add entry to package.json file npm install --save-dev <package name> - To install packages locally, as well as add entry to dev section in the package.json npm list -g --depth=0 - To list all the globally installed packages. Without depth, will list down all the installed packages and sub packages npm view cordova versions - List down all the released versions  npm uninstall --save <package name> - To  remove packages from locally. --save will remove entry from package.json npm cache clean - Delete data out of the

REST API using Node/Express/MongoDB

REST API How to initalize node app, - npm init - Will create basic setup including package.json - npm install express --save - Installing main tool express js. What --save means, it will update the package.json file for dependancy - npm install --save mongoose node-restful body-parser - General extra modules that need for REST which doesn't come up with express Task monitoring system (using gulp): Node change monitoring tool. Once do a change on the file system, app will restart automatically. - npm install -g gulp - npm install --save gulp - npm install --save-dev gulp-nodemon Note:     - npm global installations will keep in '/usr/local/lib/node_modules' in Mac. Refer Github for codes:  https://github.com/dilumdarshana/nodeREST

Mobile application using Ionic

This is my first mobile (hybrid) application created using Ionic framework. I am using Mac OS along with the Android Studio/Android SDK to compile and simulate the application. Here are the steps need to follow from the sketch. First, need to install Ionic and Cordova on your Mac/PC, npm install -g cordova ionic Can check all installed properly using the following commands, ionic -v AND  cordova -v Second, need to install and setup Android SDK, The simple way in install Android Studio and to go, Tools->Android->SDK Manager Can see all the available android versions over there. Do check the appropriate version you want and proceed with the installation. Then make sure that, android PATH set in the global paths. To do that simply open ~/.bash_profile and add the following lines, export ANDROID_HOME="Users/ <USERNAME> /Library/Android/sdk" export PATH=${PATH}:/Users/ <USERNAME> /Library/Android/sdk/platform-tools:/Users/ <USERNAME>