Skip to content

Instantly share code, notes, and snippets.

@Yogendra0Sharma
Created January 12, 2017 10:53
Show Gist options
  • Select an option

  • Save Yogendra0Sharma/fc9c7ef5c28b2e791c06a57348b3c186 to your computer and use it in GitHub Desktop.

Select an option

Save Yogendra0Sharma/fc9c7ef5c28b2e791c06a57348b3c186 to your computer and use it in GitHub Desktop.
Node JS Tips and Tricks

Installing, Deleting, Updating Components

$ npm install < Package Unique Name>
$ npm install –g < Package Unique Name>
$ npm uninstall < Package Unique Name>
$ npm uninstall –g < Package Unique Name>
$ npm update < Package Unique Name>
$ npm update –g < Package Unique Name>

package.json

  • Setup in root folder of your application
$ npm init # run this command in the root folder of the app to setup a default package.json file


Node JS Basic Http Server

$ . nodejs0001/bin/activate
$ npm install http-server -g
$ cd ?? # cd into the folder where your project code resides.
$ http-server

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment