Skip to content

Instantly share code, notes, and snippets.

@101t
Last active February 18, 2019 18:17
Show Gist options
  • Save 101t/ace94f35a5d3b679b8fc5dc646b8bad5 to your computer and use it in GitHub Desktop.
Save 101t/ace94f35a5d3b679b8fc5dc646b8bad5 to your computer and use it in GitHub Desktop.
NodeJS Installation Quick Start

NodeJS

Node installation and required dependencies

NodeJS, to install NodeJS packages in this example we will use Ubuntu 14.04 TLS as OS example and expressjs as node package example, Ubuntu 16.04 TLS contains a version of Node.js in its default repositories.

apt-get update && apt-get upgrade
apt-get install nodejs

to check nodejs version

node -v

npm, which is the Node.js package manager. You can do this by typing:

apt-get install npm

NPM Usage

to install package locally use

npm install <package name>

to install package globally use

npm install <package name> -g

to display npm global envirenement package list do

npm ls -g

to display npm local envirenement package list do

npm ls

to uninstall express

npm uninstall express

to update module

npm update express

to search a module

npm search express

to create a module requires package.json to be generated.

npm init

this utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sane defaults. to add yourself as user on npm site

npm adduser

to publish your module

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