Node Practicing

Clean and purge node_modules folder

~> npm prune [<name> [<name ...]]

Install and remove packages

~> npm install <package_name>

If you use npm install -g <package... module gets globally installed in %AppData%\npm\node_modules .

Link modules to the current directory

It is a must when Live Server will be used in particular folder.

~> npm link <package_name>

Search package

~> npm search <package_name>

List installed packages

~> npm list [<package_name>]

Get the latest version number of a package

~> npm show <package_name> version

Live Server Package

~> cd <project_folder_to_be_browsed_during_development>
~> node ~> var liveServer = require("live-server");
~> var params = { port: 80, open: true, logLevel: 2, browser: "Chromium" }
~> liveServer.start(params);

Start the Discussion!Leave a Reply