Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views2 pages

Unit II and III Notes - Converted - Removed

Uploaded by

p3727207
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Unit II and III Notes - Converted - Removed

Uploaded by

p3727207
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIT II • The npm command is used to interact with the Node Package Manager (npm), which is a

package manager for JavaScript. It is commonly used in the development of Node.js


NODE JS
applications, allowing developers to install, manage, and share reusable code packages.
Selecting a Node.js IDE:
Basics of Node JS – Installation – Working with Node packages – Using Node package manager Selecting an Integrated Development Environment (IDE) for Node.js development
– Creating a simple Node.js application – Using Events – Listeners –Timers - Callbacks – Handling depends on your specific needs, preferences, and the features you require.
Data I/O – Implementing HTTP services in Node.js Eg: Eclipse, Webstrom IDE, Visual studio Code
https://books.google.co.in/books?id=rKQ5DwAAQBAJ&pg=PT78&source=gbs_toc_r&cad=2# Extension: .js, .json, .html, .css
v=onepage&q&f=false Working with node packages
BASICS OF NODE JS
Node packaged Module
Understanding Node.js: A Node Packaged Module, often referred to as an npm package or simply a Node
• Node.js was developed in 2009 by Ryan Dahl . module, is a reusable piece of code that can be shared and used across different Node.js projects.
• Node.js on Top of v8 as server side environment that matched with the client side environment These modules are distributed via the npm registry, which is the default package
in the browser. ( scalable) manager for Node.js. They can include libraries, frameworks, tools, or even entire applications
that other developers can install and use. Each module available for specific purpose
• Node.js is a runtime environment for JavaScript that runs on the server.
• Eg: Mongoose→for ODM(Operational Data Model)for Mongo Db
• The Node.js environment id easy to install, configure, deploy and ease of maintenance
• Includes a package.json file→define the packages
• yahoo, Linkedin, eBay, Microsoft companies use Node.js
Understanding Node package Registry
• Asynchronous platform
Node module have a managed location called the Node Package Registry where
→handle thousands of concurrent connections with a single server without introducing packages are registered. It allows you to publish your own packages
the burden of managing threads concurrency The Node Package Registry (commonly referred to as the npm registry) is a vast,
online repository of JavaScript packages. It is the central place where developers can publish
• Node.js contain huge number of libraries and share their Node.js packages, and where others can discover, download, and use these
Installing Node.js packages in their projects.
The node package registry is located at https://npmjs.com
• Official packages for all the major platforms are available at https://nodejs.org
• List of executables in node.js install location
1. node
2. npm
3. node_modules
Node: This file starts a Node.js Java Script VM.
Npm : This command is used to manage the Node.js packages
node modules folder: This folder contains the installed Node.js packages. These packages act
as libraries that extend the capabilities of Node.js.
Verify node.js executables:
Using the Node package Manager:
• After installation, open a terminal or command prompt. • Npm is seen as a Command line utility
• To verify that Node.js and npm are installed, run the following command: node • It allows to Find, install remove, publish, and do every thing related to Node package Module
• It Provides the link between Node package registry and your development environment
UNIT III Example:
MONGO DB // Document 1
{
Understanding NoSQL and MongoDB – Building MongoDB Environment – User accounts – "_id": 1,
Access control – Administering databases – Managing collections – Connecting to MongoDB
from Node.js – simple applications "name": "Alice",
"age": 25,
UNDERSTANDING NOSQL AND MONGODB "city": "New York"
NoSQL }
"Not Only SQL," or "NoSQL," can be defined as a database which is employed for // Document 2 (in the same collection)
managing the massive collection of unstructured data and when the data is not piled up in a
{
tabular format or relations like that of relational databases.
"_id": 2,
NoSQL databases are a preferred option for contemporary applications dealing with
enormous amounts of unstructured or semi-structured data because they accept flexibility, "name": "Bob",
scalability, and performance.
"age": 30,
Types of Databases in NoSql:
"hobbies": ["reading", "travelling"]
Here are some of the common database types that come under NoSQL:
}
1. Document type databases: the key gets paired with a compound data structure, i.e.,
document. MongoDB is an example of such type.
2. Key-Value stores: each unstructured data is stored with a key for recognizing it.
3. Graph stores: In this type of database, data is stored mostly for networked data. It helps
to relate data based on some existing data.
4. Wide-column stores: This type of data stores large data sets Cassandra (Used by
Facebook), HBase are examples of such type.
MongoDB
MongoDB is one of the most accepted NoSQL database and stores data in a JSON
structure. It is what makes Mongo DB so scalable as well as flexible.
Understanding Collections:
Collections store documents, which are the basic units of data in MongoDB. Unlike
tables, collections do not enforce a schema, meaning that documents within the same collection
can have different structures.
Understanding Documents:
Documents: The basic units of data stored in a collection, represented as JSON-like objects Collection: Users is the collection that holds user-related data.
(BSON in MongoDB). Each document consists of key-value pairs and can include nested Document: The JSON object is a document representing a specific user. It includes fields like
documents and arrays. Each document contains key-value pairs and can include nested documents _id, name, email, and a nested document for address.
and arrays.

You might also like