Skip to content

Commit 742a84d

Browse files
What is node js
1 parent 561b1f1 commit 742a84d

14 files changed

+232
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Create a Node.js application
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Explore Azure storage services
2+
3+
Azure Storage provides various services to meet different data storage and management needs. Here's an overview of the main Azure Storage services:
4+
5+
## Azure Blob Storage:
6+
7+
Overview: Blob Storage is designed for storing massive amounts of unstructured data, such as documents, images, videos, and logs.
8+
Use Cases: Content delivery, backups, data archiving, media storage.
9+
Key Features: Supports hot, cool, and archive storage tiers, hierarchical namespace, and versioning.
10+
11+
## Azure File Storage:
12+
13+
Overview: Azure Files offers fully managed file shares in the cloud, accessible via the Server Message Block (SMB) protocol.
14+
Use Cases: File sharing, application data sharing, and cloud-based file servers.
15+
Key Features: Fully managed, supports SMB and REST APIs, can be mounted on Windows, Linux, and macOS.
16+
17+
## Azure Table Storage:
18+
19+
Overview: A NoSQL data store that provides key/attribute storage with a schema-less design, suitable for semi-structured data.
20+
Use Cases: Scalable applications, quick and flexible data storage.
21+
Key Features: NoSQL, automatic indexing, low-latency access to large amounts of data.
22+
23+
## Azure Queue Storage:
24+
25+
Overview: A simple message-queue service that enables communication between components of cloud services.
26+
Use Cases: Decoupling of application components, workload scaling.
27+
Key Features: Message queuing, reliable and asynchronous communication.
28+
29+
## Azure Disk Storage:
30+
31+
Overview: Managed disks provide scalable and high-performance block storage for Azure Virtual Machines.
32+
Use Cases: Virtual machine storage, database storage.
33+
Key Features: Managed disks, different performance tiers, snapshots, and disk encryption.
34+
35+
## Azure Data Lake Storage:
36+
37+
Overview: A scalable and secure data lake that allows analytics on large amounts of data with hierarchical namespace and fine-grained access control.
38+
Use Cases: Big data analytics, data warehousing, machine learning.
39+
Key Features: Hierarchical namespace, fine-grained access control, integration with Azure Analytics services.
40+
41+
## Azure Managed Disks for Virtual Machines:
42+
43+
Overview: Managed Disks simplify disk management for Azure Virtual Machines by handling the storage account configuration and disk management tasks.
44+
Use Cases: Virtual machine storage, simplified disk management.
45+
Key Features: Managed disks, different performance tiers, snapshots.
46+
47+
## Azure Backup:
48+
49+
Overview: Azure Backup provides scalable and secure offsite backup for on-premises and cloud-based workloads.
50+
Use Cases: Data protection, backup and restore of virtual machines, databases, and files.
51+
Key Features: Centralized management, long-term retention, backup for various workloads.
52+
53+
## Azure Blob Indexer (Preview):
54+
55+
Overview: Blob Indexer is designed to make Azure Blob Storage an efficient data lake solution by providing indexing capabilities for metadata and content search.
56+
Use Cases: Enhanced search capabilities for blob storage.
57+
Key Features: Indexing for metadata and content, integrated with Azure Synapse Analytics.
58+
59+
## Azure Static Web Apps:
60+
61+
Overview: Azure Static Web Apps allow hosting static web applications directly from Azure Storage with built-in CI/CD support.
62+
Use Cases: Hosting static websites, SPA (Single Page Applications).
63+
Key Features: Integrated CI/CD, custom domains, global distribution.
64+
These services can be used individually or in combination to build scalable, flexible, and highly available storage solutions in the Azure cloud. Choose the service(s) that best fit your specific application and data requirements.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Connect an app to Azure Storage
2+
3+
To connect an application to Azure Storage, you'll typically need to follow these general steps. The specific implementation details may vary based on the programming language and framework used in your application.
4+
5+
## Prerequisites:
6+
7+
### Azure Storage Account:
8+
9+
Ensure you have an Azure Storage account created. If not, refer to the previous instructions on how to create an Azure Storage account.
10+
11+
### Access Keys or Shared Access Signature (SAS):
12+
13+
Retrieve the access keys or generate a Shared Access Signature (SAS) token for your Azure Storage account. These credentials will be used by your application to authenticate and access the storage account.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// async/await asynchronous example
2+
3+
const fs = require("fs").promises;
4+
5+
const filePath = "./file.txt";
6+
7+
// `async` before the parent function
8+
async function readFileAsync() {
9+
try {
10+
// `await` before the async method
11+
const data = await fs.readFile(filePath, "utf-8");
12+
console.log(data);
13+
console.log("Done!");
14+
} catch (error) {
15+
console.log("An error occurred...: ", error);
16+
}
17+
}
18+
19+
readFileAsync()
20+
.then(() => {
21+
console.log("Success!");
22+
})
23+
.catch((error) => {
24+
console.log("An error occurred...: ", error);
25+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# How Node.js works
2+
3+
Types of tasks
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const https = require("https");
2+
3+
console.log(`start`);
4+
5+
try {
6+
const response = await https.get("https://nodejs.org/dist/index.json");
7+
8+
console.log(res.statusCode);
9+
} catch (error) {
10+
console.log(error);
11+
}
12+
13+
console.log(`end`);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Hello World, from a script file.");

Intoduction to Node.js/How Node.js works/hello-world/node_modules/.package-lock.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Intoduction to Node.js/How Node.js works/hello-world/node_modules/https/package.json

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Intoduction to Node.js/How Node.js works/hello-world/package-lock.json

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"https": "^1.0.0"
4+
}
5+
}
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Intoduction to Node.js
2+
3+
- Explain what Node.js is
4+
- Describe how Node.js works with its event-driven architecture
5+
- Identify when to use Node.js
6+
- Create and run a Node.js script from the command line
7+
- Asynchronous techniques: callbacks, promises, and async/await
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# What is Node.js?
2+
3+
Node.js is an open-source, cross-platform JavaScript runtime environment that allows developers to execute server-side JavaScript code. It is built on the V8 JavaScript runtime engine, which is the same engine that powers the Google Chrome browser.
4+
5+
Node.js enables developers to use JavaScript for both client-side and server-side development, providing a unified language and environment for building web applications. It is particularly well-suited for building scalable and high-performance network applications, as it is event-driven and non-blocking.
6+
7+
## SQL databases which use JavaScript JSON objects include:
8+
9+
- PostgreSQL
10+
- MySQL
11+
- Microsoft SQL Server
12+
13+
## NoSQL databases which use JavaScript JSON objects include:
14+
15+
- MongoDB
16+
- CouchDB
17+
- Cassandra
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Why might you need Node.js?
2+
3+
Node.js is a popular open-source, cross-platform JavaScript runtime environment that allows developers to execute JavaScript code on the server side. Here are some reasons why you might need Node.js:
4+
5+
### JavaScript on the Server Side:
6+
7+
Node.js allows developers to use JavaScript for server-side scripting, enabling a unified language across both client and server. This can streamline development workflows and make it easier for developers to switch between frontend and backend tasks.
8+
9+
### Event-Driven Architecture:
10+
11+
Node.js is built on an event-driven, non-blocking I/O model. This makes it well-suited for handling concurrent connections and performing tasks asynchronously, leading to efficient and scalable applications.
12+
13+
### Real-time Applications:
14+
15+
Due to its event-driven nature and support for WebSockets, Node.js is commonly used for real-time applications like chat applications, online gaming, and collaborative tools where low-latency communication is crucial.
16+
17+
### NPM (Node Package Manager):
18+
19+
Node.js comes with NPM, a powerful package manager that simplifies the process of installing, managing, and updating third-party libraries and frameworks. NPM has a vast ecosystem of modules that can be easily integrated into Node.js applications.
20+
21+
### Community and Ecosystem:
22+
23+
Node.js has a large and active community, which contributes to its rich ecosystem of libraries and frameworks. This community support can be beneficial for finding solutions to common issues, sharing best practices, and staying updated on the latest developments.
24+
25+
### Scalability:
26+
27+
Node.js is known for its ability to handle a large number of simultaneous connections efficiently. This makes it suitable for building scalable network applications, such as web servers that need to handle many concurrent requests.
28+
29+
### Cross-Platform Development:
30+
31+
Node.js is designed to be cross-platform, meaning it can run on various operating systems such as Windows, macOS, and Linux. This can simplify the development and deployment process, allowing for greater flexibility.
32+
33+
### Microservices Architecture:
34+
35+
Node.js is often used in microservices architectures due to its lightweight and modular nature. It allows developers to build and deploy independent services that communicate with each other, providing scalability and flexibility in large and complex applications.
36+
37+
### Streaming Data:
38+
39+
Node.js is well-suited for handling streaming data, making it suitable for applications that involve real-time analytics, file uploads, and processing large datasets.

0 commit comments

Comments
 (0)