Thursday, September 3, 2020

PHP vs. Node.js

 


PHP and Node.js are both used for the server side development and thus have become a competitor for each other. Below are some differences based on different parameters to understand the two and make decision between the two giants.


https://www.geeksforgeeks.org/php-vs-node-js/

Npm Vs Yarn

 Fetching packages

  • npm: npm fetches dependencies from the npm registry during every ‘npm install‘ command.
  • Yarn: yarn stores dependencies locally, and fetches from the disk during a ‘yarn add‘ command (assuming the dependency(with the specific version) is present locally).

Commands changed in yarn after npm

COMMANDNPMYARN
Install dependenciesnpm installyarn
Install packagenpm install package_name
npm install package_name@version_number
yarn add package_name
yarn add package_name@version_number
Uninstall packagenpm uninstall package_nameyarn remove package_name
Install dev packagenpm install package_name –save-devyarn add package_name –dev
Update dev packagenpm update package_name
npm update package_name@version_number
yarn upgrade package_name
yarn upgrade package_name@version_number
View packagenpm view package_nameyarn info package_name
Global install packagenpm install -g package_nameyarn global add package_name

Commands same for npm and yarn:

NPMYARN
npm inityarn init
npm run [script]yarn run [script]
npm listyarn list
npm testyarn test
npm linkyarn link
npm login or logoutyarn login or logout
npm publishyarn publish

Laravel boiler plate

 https://github.com/rappasoft/laravel-boilerplate?fbclid=IwAR1TvlPxfY5vRSaEO2g_6lUpaNvHzAYPWNJtRocBjnktz7AxaxtZnqOSzK4