Packages - ybouz2/project-tech GitHub Wiki
Packages
The npm registry contains packages, many of which are also Node modules, or contain Node modules.
A package is a file or directory that is described by a package.json
file. A package must contain a package.json
file in order to be published to the npm registry.
Modules
A module is any file or directory in the node_modules
directory that can be loaded by the Node.js require()
function.
To be loaded by the Node.js require()
function, a module must be one of the following:
- A folder with a
package.json
file containing a"main"
field. - A JavaScript file.
to install packages most of the time you just have to write in your terminal:
$ npm i <- Name of package ->
Which packages i've used and what they do
Express
It is an Fast, unopinionated, minimalist web framework for Node.js
Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications. It facilitates the rapid development of Node based Web applications. Following are some of the core features of Express framework:
- Allows to set up middlewares to respond to HTTP Requests.
- Defines a routing table which is used to perform different actions based on HTTP Method and URL.
- Allows to dynamically render HTML Pages based on passing arguments to templates.
How to install
$ npm install express
bcryptjs
The bcrypt hashing function allows us to build a password security platform that scales with computation power and always hashes every password with a salt.
How to install
$ npm install bcryptjs
bodyparser
Body-parser is the Node.js body parsing middleware. It is responsible for parsing the incoming request bodies in a middleware before you handle it.
How to install
$ npm install bcryptjs
dotenv
DotEnv is a lightweight npm package that automatically loads environment variables from a .env
file into the process.env
object.
How to install
$ npm install dotenv
handlebars
Handlebars. js is a templating engine similar to the ejs module in node. js, but more powerful and simple to use. It ensures minimum templating and is a logicless engine that keeps the view and the code separated. It can be used with express as the hbs module.
How to install
$ npm install handlebars
method-override
Create a new middleware function to override the req. method property with a new value. This value will be pulled from the provided getter . getter - The getter to use to look up the overridden request method for the request.
How to install
$ npm install method-override
mongodb
MongoDB Node. js driver supports database connection, authentication, CRUD operations, and observations, among other features.
How to install
$ npm install mongodb
nodemon
nodemon is a command-line interface (CLI) utility developed by @rem that wraps your Node app, watches the file system, and automatically restarts the process.
How to install
$ npm install nodemon
passport & passport-local
Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more.
How to install
$ npm install passport passport-loca
q
The simplest way to create a Promise object would be to use the Q function constructor, like this new Q(value) will create a new promise object. You can then attach the success and failure handlers, like this new Q(value) .
How to install
$ npm install q
source: All the packages and their documentention can be foun on npmjs.com