Angular-cli, node, npm most used commands
Tech-Today

Angular-cli, node, npm most used commands


Below is a summary of the most used commands, specially when starting up or debugging an angular project tested on node server.


Note that to execute the commands below, you need to install node first.
// check node and npm versions
node --version
npm --version

// install the latest angular cli
npm install -g @angular/cli@latest

//install angular cli in dev dependencies
npm install --save-dev @angular/cli@latest

// install dependencies in package.json
npm install
// install node-sass for processing scss
npm install -g node-sass
// install specific version of dependency, for example typescript
npm install --save-dev [email protected]

// analyze available updated dependencies
ncu

// update package.json (change version in file) and dependencies
ncu -u

// update the local libraries
npm update

// check angular/cli version
ng --version

// clean the cache
npm cache clean --force

// verify the cache
npm cache verify

// remove unused dependencies
npm prune

// uninstall angular cli
npm uninstall -g @angular/cli

// remove node_modules and dist folder
rm -rf node_modules dist

// build the project
ng build --prod --aot=false

Notes:





- Docker Swarm Commands
This tutorial requires connection to the internet as swarm creation and management needs Docker Hub. Requirements WindowsDocker CEVirtualBox*Needless to say, a docker for windows must be running. docker run swarm create --Download the swarm image locally....

- Apache Cassandra Clustering
This tutorial will help us configure an Apache Cassandra's ring with 2 nodes. It will not explain what Cassandra is, use Google for that. There are actually not too many properties that we must update in order to set up the cluster. Note that in...

- Secure Angular4 App With Keycloak
Demo template is available for sale for $50. You can send payment via skype at: [email protected] Disclaimer: This is not a tutorial on how to setup an Angular^4 project, nor are we going to discuss how to setup a Keycloak server. Needless to say, you...

- How To Create A Glassfish Cluster
This tutorial will attempt to explain, how to create a Glassfish cluster using the Glassfish's admin interface. To do this, you must have download, install and configured Glassfish's domain1 to start. Steps: 1.) Create nodes (What are nodes? See...

- A Maven Project That Have Multiple Property Files Via Maven Antrun Plugin
This tutorial will answer several questions (below) within a maven project that has several configuration files (dataset, property, persistence). 1.) How to have multiple persistence, datasource and property files depending on the profile or environment...



Tech-Today








.