- Node.js
- NPM
In a web browser, navigate to https://nodejs.org/en/download/. Click the Windows Installer button to download the latest default version. The Node.js installer includes the NPM package manager.
-
Once the installer finishes downloading, launch it. Open the downloads link in your browser and click the file. Or, browse to the location where you have saved the file and double-click it to launch.
-
The system will ask if you want to run the software – click Run.
-
You will be welcomed to the Node.js Setup Wizard – click Next.
-
On the next screen, review the license agreement. Click Next if you agree to the terms and install the software.
-
The installer will prompt you for the installation location. Leave the default location, unless you have a specific need to install it somewhere else – then click Next.
-
The wizard will let you select components to include or remove from the installation. Again, unless you have a specific need, accept the defaults by clicking Next.
-
Finally, click the Install button to run the installer. When it finishes, click Finish.
Open a command prompt (or PowerShell), and enter the following::
~] node –v
The system should display the Node.js version installed on your system. You can do the same for NPM::
~] npm –v
To install Node.js and npm, open a terminal and type the following command ::
~] sudo apt-get install nodejs npm
- Note: some nodejs packages expect the
node
command to be available. Some deb packages of nodejs include this symlink, some do not if not: On Ubuntu you can install the nodejs-legacy package to fix this::
~] sudo apt-get install nodejs-legacy
Now we should have both the node and npm commands working ::
~] node -v ~] npm -v
::
~] npm install -g grunt-cli
Installing Node.js and NPM is pretty straightforward using Homebrew. Homebrew handles downloading, unpacking and installing Node and NPM on your system. The whole process (after you have Homebrew installed) should only take you a few minutes.
Open the Terminal app and type brew update. This updates Homebrew with a list of the latest version of Node ::
~] brew install node.
Sit back and wait. Homebrew has to download some files and install them. But that’s it.
::
~] node -v ~] npm -v
Checkout the CRAMS Frontend source from https://github.com/CRAMS-Dashboard/crams-frontend ::
~] git clone https://github.com/CRAMS-Dashboard/crams-frontend.git
::
~] cd crams-frontend ~] npm install
There are local
, dev
, demo
, staging
, qat
, prod
settings in the Gruntfile.js
. Modify the apiEndpoint
to fit the right crams api backend url.
::
~] grunt runlocal
::
~] grunt rundev
::
~] grunt rundemo
::
~] grunt runstaging
::
~] grunt runqat
::
~] grunt runprod
::
~] grunt utest