Handling URL's in NodeJS

Piyush Garg
11 Jan 202320:36

Summary

TLDRThis video script delves into the concept of URLs, explaining their full form as Uniform Resource Locators and their fundamental components. It discusses the protocol, domain, and path, using examples like 'http', 'www.google.com', and '/about'. The script also covers the function of query parameters in URLs for passing extra information to the server, and how to handle and manipulate URLs using JavaScript. The explanation aims to clarify how URLs are constructed and used in web communication.

Takeaways

  • 😀 A URL (Uniform Resource Locator) is a fundamental way to access resources on the internet, and it has a specific structure that includes protocol, domain, path, and query parameters.
  • 🔐 The 'protocol' part of a URL defines the rules for communication between the browser and the server, such as HTTP, HTTPS, and WebSocket.
  • 🌐 The 'domain' in a URL is the human-friendly name that points to an IP address, which is resolved to the server hosting the website or resource.
  • 📝 The 'path' in a URL is used to specify the location of a resource on a server and can include nested paths for more specific directories or files.
  • 🔍 Query parameters in a URL are optional and used to send additional data to the server along with the request. They follow the '?' symbol and are often used for search queries.
  • 🔑 The 'query parameters' are key-value pairs that start with a '?' and are separated by '&' if there are multiple parameters.
  • 🛠️ The script discusses the use of a package called 'url' in JavaScript to parse and manipulate URLs, which can be installed via npm (Node Package Manager).
  • 📚 The 'url' package provides functionality to break down a URL into its components and extract information such as protocol, host, path, and query parameters.
  • 🔄 The process of creating a URL involves combining the protocol, domain, path, and query parameters in a specific order to form a valid URL string.
  • 📈 The script also touches on the concept of handling URLs on a server, where incoming requests with URLs are parsed to determine how to respond with the appropriate data.
  • 🔗 Understanding the structure and components of a URL is crucial for web development, as it affects how resources are requested and delivered to users.

Q & A

  • What is the full form of URL?

    -The full form of URL is Uniform Resource Locator, which is a web address used to locate and access web resources.

  • What are the major components of a URL?

    -The major components of a URL include the protocol, domain, path, and query parameters.

  • What does the protocol part of a URL signify?

    -The protocol part of a URL signifies the rules and methods used for communication between the browser and the server. Common protocols include HTTP and HTTPS.

  • What is the difference between HTTP and HTTPS protocols?

    -HTTP (Hypertext Transfer Protocol) is the basic protocol for communication on the web, while HTTPS (HTTP Secure) is the secure version that encrypts the data being transferred.

  • What is a domain name in the context of a URL?

    -A domain name is a user-friendly name that represents an IP address, making it easier for users to access websites without remembering numerical IP addresses.

  • What is a path in a URL and how is it used?

    -A path in a URL is the part that comes after the domain and before the query parameters. It directs the browser to specific pages or resources on a website, such as '/about' or '/contact'.

  • What are query parameters and how are they used in a URL?

    -Query parameters are additional pieces of information that are appended to a URL after a question mark (?). They are used to send data to the server and can be used for search queries, user identification, and other purposes.

  • How does a nested path in a URL differ from a regular path?

    -A nested path in a URL is a path that includes subdirectories or additional levels, such as '/project/van'. It allows for more specific navigation within a website's structure.

  • What is the purpose of using query parameters in a URL?

    -Query parameters in a URL are used to pass data to the server, allowing the server to customize the response based on the received data, such as filtering search results or identifying user sessions.

  • Can spaces be included in a URL directly?

    -Spaces cannot be included directly in a URL as they can break the URL format. Instead, spaces are typically encoded, often as '%20'.

  • What is the role of domain in the process of accessing a website?

    -The domain in a URL is the address of the website that users type into their browser to access the site. It is translated into an IP address by the Domain Name System (DNS) to locate the server hosting the website.

Outlines

00:00

🌐 Understanding URLs and Their Components

The first paragraph introduces the concept of a URL (Uniform Resource Locator) and its significance in accessing web resources. It explains the basic structure of a URL, including the protocol (such as HTTP), domain, and path. The explanation includes the role of domain names and IP addresses, how they are used to locate websites, and the importance of the path in navigating through the site's hierarchy. It also touches on the use of query parameters in a URL for passing additional information to the server.

05:00

🔍 Deep Dive into Query Parameters and URL Construction

This paragraph delves deeper into the mechanics of query parameters in URLs, which are used to send additional data to the server. It discusses how parameters are formatted and appended to the URL with a question mark and separated by ampersands. The paragraph provides examples of how to include user IDs and other data as query parameters. It also explains how spaces are converted into '%20' for URL encoding and how to use URL parameters in web development, including the use of external packages for URL manipulation.

10:01

🛠️ Working with URL Packages and Server Requests

The third paragraph focuses on the practical application of URL handling in web development. It describes the process of installing and using an external package to parse and manipulate URLs. The speaker demonstrates how to import the package, use it to extract parts of a URL, and pass parameters to a server request. The paragraph also discusses the importance of dependencies in package management and how to reinstall packages if needed.

15:04

📝 Exploring URL Path Variables and Query Parameters

This section discusses the use of path variables and query parameters in URLs for dynamic web content. It explains how to pass variables like user IDs and other data through the URL path and as query parameters. The paragraph includes examples of how to extract these variables and use them in server-side logic to generate responses. It also touches on the concept of nested paths and how they can be utilized in web applications.

20:05

🎬 Creating Interactive Web Pages with URLs

The fifth paragraph describes the process of creating interactive web pages using URLs and query parameters. It talks about handling URL parts, such as the protocol, domain, path, and query parameters, to generate dynamic content. The speaker provides examples of how to use URL data to interact with databases and send customized responses to the user. The paragraph also covers the concept of URL encoding and decoding, and how to structure server responses based on URL data.

📝 Final Thoughts on URL Structure and Video Recap

In the final paragraph, the speaker wraps up the discussion on URLs by summarizing the key points covered in the video. They reiterate the importance of understanding URL structure for web development and provide a brief overview of how URLs are broken down into components such as protocol, domain, path, and query parameters. The paragraph ends with an invitation for viewers to like, subscribe, and look forward to the next video in the series.

Mindmap

Keywords

💡URL

URL stands for Uniform Resource Locator and is the standard for locating resources on the web. In the video, it is the central theme as the script discusses the structure and components of a URL, such as protocol, domain, and path. For example, the script mentions 'http' as a protocol and 'google.com' as a domain within a URL.

💡Protocol

In the context of the internet, a protocol defines the rules for data communication. The script refers to protocols like 'http' and 'https', where 'http' stands for Hypertext Transfer Protocol and 'https' indicates a secure version with encryption, as part of the URL structure.

💡Domain

A domain is a human-friendly address for an IP resource on the internet. The script explains that domains like 'google.com' can be used instead of IP addresses to make URLs more accessible and memorable.

💡Path

In a URL, the path comes after the domain and helps to locate specific pages or resources on a website. The script uses '/about' as an example of a path, indicating a webpage that might contain information about the company or website.

💡Query Parameters

Query parameters are used in a URL to send additional data to the server. The script mentions query parameters starting with a question mark (?) and separated by the ampersand (&) symbol, such as 'user_id=1', which can be used to filter or sort results on the server-side.

💡IP Address

An IP address is a numerical label assigned to devices connected to a computer network that uses the Internet Protocol for communication. The script discusses how domain names are translated to IP addresses, which are the actual addresses that servers use to identify each other.

💡HTTPS

HTTPS stands for Hypertext Transfer Protocol Secure and is an extension of HTTP with added security features. The script touches on HTTPS as a protocol that includes SSL certificates to ensure encrypted communication between the browser and the server.

💡WebSocket

WebSocket is a protocol that provides full-duplex communication channels over a single TCP connection. The script briefly mentions WebSocket as a protocol for real-time communication on the web, which is different from the traditional HTTP request-response model.

💡Domain Parsing

Domain parsing involves translating a domain name into an IP address. The script explains the process of domain parsing, where a domain like 'google.com' is resolved to its corresponding IP address through DNS (Domain Name System).

💡Nested Path

A nested path in a URL refers to a path that includes subdirectories or multiple levels. The script uses '/project/van' as an example of a nested path, illustrating how URLs can be structured to represent hierarchical data or file structures.

💡npm

npm stands for Node Package Manager and is a registry of JavaScript packages. The script discusses using npm to install packages like 'url', which can be used to work with URLs in a Node.js environment, demonstrating how developers can leverage npm to expand their project's functionality.

Highlights

Introduction to the concept of a URL and its basic components.

Explanation of the full form of URL as Uniform Resource Locator.

Discussion on the protocol component of a URL and its role in communication.

Differentiation between HTTP and HTTPS protocols, with emphasis on security.

The role of domain names in making URLs user-friendly.

How domain names are resolved to IP addresses through DNS.

The function of the path component in a URL for accessing specific resources.

Explanation of nested paths and how they are used in URLs.

Introduction to query parameters in URLs for passing additional information.

The significance of the question mark (?) in starting query parameters.

How to use the URL package in JavaScript for URL manipulation.

Demonstration of extracting URL components using the URL package.

Explanation of how to pass query parameters and path variables in a URL.

The process of URL encoding to handle special characters.

How to construct a URL for a search query on platforms like Google.

The function of the ampersand (&) in separating multiple query parameters.

The role of URL in server requests and responses for dynamic content.

Practical example of creating a URL for a YouTube search.

Final thoughts on the importance of understanding URL structure for web development.

Transcripts

play00:00

एवरीवन वेलकम बैक एंड वेलकम तू अंदर

play00:02

वीडियो और नोट सीरीज और इस वीडियो में हम

play00:05

समझने वाले हैं व्हाट इस यूआरएल एक यूआरएल

play00:08

क्या होता है एंड व्हाट आर डी मेजर

play00:10

कॉम्पोनेंट्स ऑफ अन यूआरएल ओके सो लेट्स

play00:13

स्टार्ट विथ डी वीडियो तो एक यू आर एल

play00:14

बेसिकली इसका फुल फॉर्म होता है यूनिफॉर्म

play00:16

रिसोर्स लोकेटर एक होता क्या है करेक्ट

play00:18

बिकॉज अगर तुम एक वसंत हो गया पर बन्ना

play00:21

चाहते हो यू शुड नो डेट यूआरएल कम कैसे

play00:23

करता है व्हाट हो तू पास यू आर एल एंड

play00:25

व्हाट आर डी कॉम्पोनेंट्स ऑफ अन यूआरएल

play00:28

यू आर एल बेसिकली यूनिफॉर्म रिसोर्स

play00:30

लोकेटर होता है फॉर एग्जांपल लाइक ये मेरी

play00:32

वेबसाइट है तो इसका यूआरएल के इसका यूआरएल

play00:35

पियूष करेक्ट सो दिस इसे दी होल उर है तो

play00:38

इस यूआरएल को इंडिप्थ में समझते हैं

play00:41

करेक्ट सो यू हैव एचटीटीपी कोलन / व्यू.

play00:56

इसको हम क्या कहते हैं इसको हम कहते हैं

play00:58

प्रोटोकॉल

play01:00

है तो एचटीटीपीएस का मतलब होता है पर

play01:02

टेक्स्ट ट्रांसफर प्रोटोकॉल सीकर ठीक है

play01:05

सिमिलरली हमारे पास एक एचटीटीपी होता है

play01:07

जो सीकर नहीं होता है एंड यह प्रोटोकॉल का

play01:11

मतलब क्या होता है प्रोटोकॉल का मतलब होता

play01:12

है की मेरा जो यह सर्वर है ना उसके साथ

play01:15

कम्युनिकेट कैसे करना है ठीक है तो

play01:16

प्रोटोकॉल एक सेट ऑफ रूल्स होता है जो

play01:19

बेसिकली ब्राउज़र को बताता है डेट किस तरह

play01:21

से कम्युनिकेशन करना है सो जैसे हमारे पास

play01:24

एचटीटीपी एस होता है तो मतलब की जितनी भी

play01:26

हमारी रिक्वेस्ट और रिस्पांस होंगी वो

play01:28

इंक्रिप्टेड होंगी ओके इसमें सल

play01:30

सर्टिफिकेट उसे होता है जो हमारा एचटीटीपी

play01:33

होता है उसमें बेसिकली सल सर्टिफिकेट नहीं

play01:35

होता और वो लेस सीकर होती है हमारे पास उस

play01:39

एक प्रोटोकॉल होता है फॉर वेब सॉकेट अगर

play01:40

तुम्हें रियल टाइम कम्युनिकेशन करने हैं

play01:42

तो यू आर वेलकम

play02:00

ये बेसिकली यूजर फ्रेंडली नाम है मेरे

play02:02

आईपैड का ओके तो जो मेरा सर्वर है जो जो

play02:05

बेसिकली जो इसका सर्वर है जहां पर भी ये

play02:07

रन कर रहा है सब कुछ तो उसे पार्टिकुलर

play02:10

वेबसाइट का उसे पार्टिकुलर सर्वर का एक

play02:12

आईपी एड्रेस है करेक्ट लेकिन ओबवियसली तुम

play02:15

आईपीएल ड्रेस को याद नहीं कर सकते राइट तो

play02:18

हमारे को ये नहीं का सकता था ये मेरा

play02:19

आईपैड रिसर्च मेरी वेबसाइट को विजिट करना

play02:21

तो हम क्या करते हम एक डोमेन परचेज करते

play02:24

हैं एंड हम उसे डोमेन को उसे आईपी की तरफ

play02:26

पॉइंट करवा देते हैं तो मेरे वेबसाइट का

play02:29

एक यूजर फ्रेंडली मतलब जो एक ह्यूमन

play02:31

फ्रेंडली नाम बन जाता है करेक्ट बिकॉज इफ

play02:34

यू गो तू google.com लेट अस से मैं यहां

play02:35

पर google.com ओपन करता हूं तो इस

play02:37

google.com आईपीएल ट्रिक्स पता कर सकता

play02:39

हूं आई कैन गो तू माय टर्मिनल तो मैं अपना

play02:41

टर्मिनल यहां पर ओपन करूंगा जस्ट अन सेकंड

play02:45

ठीक है तो यह मेरा टर्मिनल है तो मैं यहां

play02:48

पर बोल सकता हूं

play02:50

जैसे मैं इंटर करूंगा मेरे पास एक आईपी

play02:53

एड्रेस आया करेक्ट तो ये वो आईपी एड्रेस

play02:55

है जो एक्चुअली में गूगल का सर्वर है ठीक

play02:57

है तुम इसको ब्राउज़र में दल के देख सकते

play02:58

हो तो अगर मैं आईपैड को यहां पर कॉपी

play03:00

पेस्ट करता हूं तो ऑटोमेटेकली google.com

play03:03

ओपन

play03:04

ड्रेस को याद करना बहुत डिफिकल्ट है तो

play03:07

यूआरएल क्या होता है बेसिकली यूआरएल एक

play03:10

यूजर फ्रेंडली नाम होता है तुम्हारे आईपी

play03:12

एड्रेस का ओके तो ये होता है हमारा डोमेन

play03:14

एंड लास्ट में हमारे पास आता है पथ तो ये

play03:17

जो स्लैश तुम देख रहे हो उसको हम क्या

play03:18

कहते हैं पथ है तो जैसे स्लैश का मतलब

play03:20

होता है रूट पथ या फिर इसको हम कहते हैं

play03:22

होम पेज तो अगर तुम्हें सी यू आर एल को

play03:24

देखते हो सो करेंटली लाइक ये स्लैश रेंडर

play03:26

नहीं होता लेकिन अगर मैं यहां पे स्लैश

play03:27

लिखूंगा अभी सो यू कैन सी डेट होम पेज इस

play03:29

गेटिंग स्लैश का मतलब क्या होता है रूट पथ

play03:32

ठीक है इसके बारे में हमने थोड़ा सा पिछली

play03:34

वीडियो में देखा था की ये रिमेंबर्स लास्ट

play03:36

का मतलब होता है होम पेज स्लैश अबाउट एक

play03:38

बात होता है सो सिमिलरली जो लास्ट ये होता

play03:41

है इसको हम क्या कहते हैं पथ ओके ग्रेट तो

play03:43

हमें यूआरएल का एक बेसिक तो समझ ए गया

play03:46

प्रोटोकॉल डोमेन एंड पथ ओके

play03:50

लाइक सी कैन हैव अन सिंपल पथ दिस इस स्लैश

play03:53

अबाउट के स्लैश अबाउट एक पथ है सिमिलरली

play03:56

हमारे पास कॉन्टैक्ट अस भी एक पथ हो सकता

play03:58

है करेक्ट तो ये क्या होता है पथ होते हैं

play04:00

एंड हमारे पास नेस्टेड पार्ट्स भी हो सकते

play04:02

हैं लाइक फॉर एग्जांपल प्रोजेक्ट स्लैश

play04:04

वैन इसे अन पथ तो इस चीज को हम कहते हैं

play04:06

नेस्टेड पथ मतलब स्लैश प्रोजेक्ट स्लैश

play04:09

वैन एक बात है नेस्टेड पात है सिमिलरली

play04:11

हमारे पास हो सकता है स्लैश प्रोजेक्ट

play04:12

स्लैश तू एक दूसरा नेस्टेड पथ तो इसको हम

play04:15

क्या कहते हैं nisted पथ राइट सो इफ यू गो

play04:17

तू माय वेबसाइट यू कैन सी डेट अगर मैं

play04:18

यहां पर क्लिक करता हूं फॉर एग्जांपल माय

play04:20

गियर्स पर सो अभी मेरा पथ क्या हो चुका है

play04:23

स्लैश गियर्स करेक्ट तो ये एक डिफरेंट पथ

play04:25

है तो हम अपने सर्वर को बता सकते हैं डेट

play04:27

किस बात के लिए किस तरह से रेस्पॉन्ड करना

play04:29

है एंड सिमिलरली व्हाट सी कैन हैव आई कैन

play04:31

हैव नेस्टेड पथ फॉर एग्जांपल अगर मैं यहां

play04:33

पे बोलता हूं स्लैश प्रोजेक्ट स्लैश टेक

play04:35

तो मेरा टिक टॉक तू वाला प्रोजेक्ट ओपन हो

play04:37

जाएगा ठीक है तो ये क्या है ये एक nisted

play04:39

बात है तो यहां पर तुम गेम को खेल भी सकते

play04:41

हो ओके सो डिसऑर्डर ऑन टिकटोक गेम तो यहां

play04:44

पर वो पूरा कोड है तो यह इसको हम क्या

play04:46

कहते इसको हम कहते हैं नेस्टेड पथ तो इस

play04:48

चीज को हम बोलते हैं पथ तो प्रोटोकॉल ओके

play04:50

सो सी आर गेटिंग क्लियर विद प्रोटोकॉल दें

play04:52

डोमेन दें दी पथ फिर हमें पता लग चुका है

play04:55

निश्चय पथ्स क्या होते हैं एंड दें कॉम दी

play04:58

क्वेरी पैरामीटर्स ओके सो ये बहुत

play05:00

इंपॉर्टेंट चीज है

play05:02

कोई भी पैरामीटर्स और बेसिकली एक्स्ट्रा

play05:04

इनफॉरमेशन जो हम पास कर सकते हैं हमारे

play05:06

यूआरएल के साथ फॉर एग्जांपल यहां पर तुम

play05:09

क्या देख सकते हो

play05:11

तो ये तो था हमारा डोमेन स्लैश अबाउट क्या

play05:15

यहां पर स्लैश अबाउट के स्लैश अबाउट एस दी

play05:17

पथ दें क्वेश्चन मार्क ठीक है क्वेश्चन

play05:19

मार्क के बाद जो भी सेंटेंस आता है उसको

play05:22

हम क्या कहते हैं क्वेरी पैरामीटर्स तो

play05:24

यहां पर मैं कुछ भी की वैल्यू सेंड कर

play05:26

सकता हूं अपने सर्वर को राइट फॉर एग्जांपल

play05:28

यहां पर मैं क्या बोल रहा हूं यूजर आईडी

play05:30

वैन एंड ठीक है तो ये सेपरेट कैसे करते

play05:32

हैं एंड ए =

play05:38

पथ पर ए रही है स्लैश अबाउट पर ए रही है

play05:41

एंड मैंने फ्रंट से मैंने अपने पास में

play05:44

कुछ एक्स्ट्रा इनफॉरमेशन भेज है की जो

play05:46

यूजर अभी इस पेज को खोल रहा है ना उसकी

play05:48

यूजर आईडी है वैन एंड मतलब सेकंड पैरामीटर

play05:51

क्या है ए का वैल्यू है तू तो ये मैंने

play05:53

वैसे ही एक एग्जांपल ले लिया था तो इस चीज

play05:55

को हम बोलते हैं क्वेरी पैरामीटर्स एक

play05:57

एग्जांपल दिखाता हूं कोई पैरामीटर्स का तो

play05:59

मैं यहां पर एक इनकॉग्निटो तब ओपन करता

play06:00

हूं आई विल गो तू google.com ठीक है तो

play06:03

यहां पर लेटर सर्च फॉर अन जावास्क्रिप्ट

play06:06

इंटरव्यू क्वेश्चन तो मैंने ये सिंपल सर्च

play06:08

किया है ठीक है तो इसका जो ये यूआरएल बना

play06:11

है इसको मैं कॉपी कर लेता हूं ठीक है तो

play06:13

इस अल्कोहल इस तो मैं अपने यहां पर इसको

play06:15

पेस्ट कर लेता हूं तो ये था वो यूआरएल जो

play06:18

गूगल में बना ठीक है तो उसको देखते हैं तो

play06:20

आप यू आर गूगल ने इसको किस तरह से पास

play06:22

किया होगा तो यहां पर सबसे पहले प्रोटोकॉल

play06:24

ठीक है

play06:25

तो हमने इसके ऊपर कॉल किया उसके बाद

play06:29

www.google.com

play06:33

google.com इसे इट डोमेन दें मैंने किस पथ

play06:37

पर गया मैं गैस स्लैश सोच पर दिस इसे दी

play06:40

पथ और यहां से मेरा क्वेरी पैरामीटर

play06:42

स्टार्ट होता है ये क्वेश्चन मार्क से

play06:44

मेरा क्वालीफायर मीटर स्टार्ट हो टाइम तो

play06:46

इसमें देखता गूगल तो पहला उसने पास किया

play06:48

के तो के का मतलब होता है क्वेरी राइट तुम

play06:51

कुछ भी रख सकते हो इसका क्वेरी रख सकते हो

play06:52

सर्च पैरामीटर मतलब गूगल ने इसको क्यों

play06:55

रखा सो के की वैल्यू

play06:58

प्लस क्वेश्चन तो मतलब उसमें मेरा जो

play07:01

स्पेस द उसको प्लस में कन्वर्ट कर दिया

play07:03

बिकॉज तुम्हारे पास पेज नहीं होते ओके यू

play07:05

कैन नॉट हैव स्पेस इस इन यूआरएल तो

play07:07

दोस्तों यहां पे प्लस दल दिया तो जावा

play07:09

स्क्रिप्ट इंटरव्यू क्वेश्चंस ओके

play07:10

उसके बाद एंड

play07:13

सोर्स = एचपी नौ एचपी क्या है आई एम नॉट

play07:17

सर बट ठीक है तो गूगल नाम बेसिकली एचपी

play07:20

रखा मतलब उसकी कोई एक्स्ट्रा इनफॉरमेशन है

play07:22

दें उसके बाद एंड अगला अरगुमेंट तो उसने

play07:25

कुछ रिक्वेस्ट रखा है सो दिस इसे वेरी

play07:27

लॉन्ग रिक्वेस्ट सो आई एम नॉट सर की चीज

play07:30

क्या है बिकॉज गूगल के गूगल बहुत सारे

play07:31

पैरामीटर्स पास करता है

play07:34

तो बेसिकली क्या होता है यहां पर

play07:36

रिक्वेस्ट

play07:40

सर्च बेसिकली एक पथ होगा हमारे मतलब जो

play07:43

गूगल का सर्वर होगा वो स्लैश सर्च को

play07:45

देखेगा और वहां पर इस के को उठेगा के में

play07:47

देखेगा जावास्क्रिप्ट इंटरव्यू क्वेश्चंस

play07:49

डेटाबेस में सर्च करेगा और जो भी रिजल्ट

play07:51

होंगे उसको वो हमें रेंडर करके दे देगा तो

play07:54

इस तरह से यूआरएल कम करता है सिमिलर यू

play07:56

कैन एवं सी फॉर youtube.com अगर तुम

play07:57

यूट्यूब पे जाते हो एंड यू सर्च फॉर जावा

play08:00

स्क्रिप्ट

play08:02

ओके सो यू कैन सी डेट अगर मैं इसको कॉपी

play08:05

करता हूं एंड आय टेस्ट दिस यूआरएल हेयर सो

play08:08

यू कैन सी हमारे पास क्या है

play08:10

www.youtube.com / रिजल्ट्स क्वेश्चन

play08:13

मार्क सर्च अंडरस्कोर क्वेरी तो ये एक की

play08:16

है एंड इसकी वैल्यू क्या है

play08:19

सो डेट इस बेसिकली हो दिस यू आर एल वर्क्स

play08:22

ओके तो अब हम वापस चलते हैं तो आप थोड़ा

play08:26

सा अच्छे से हमें क्लियर होने वाला है

play08:27

सो यह वह सर्वर है जो हमने पिछले वीडियो

play08:29

में बनाया था करेक्ट तो हमने यहां पर क्या

play08:31

किया था मैंने एक स्विच डाला था रिक्वेस्ट

play08:32

स्टार्ट यूआरएल के ऊपर करेक्ट एंड यह

play08:34

हमारे वह यूआरएल से जो अपने जेनरेट हो रहे

play08:36

द सो यू कैन सी दिस यूआरएलएस ओके मैं कम

play08:39

करता हूं मैं इसको क्लियर कर देता हूं इस

play08:40

फाइल को एंड आई स्टार्ट माय सर्वर टोल से

play08:43

नम स्टार्ट तो अब इसको और अच्छे से समझते

play08:45

हैं डेट यूआरएलएस कम कैसे करते हैं तो मैं

play08:48

पहले एक रिक्वेस्ट करता हूं लोकल होस्ट आ

play08:50

8000

play08:52

एंड

play08:53

तो मेरे पास जो लोग बना वो कहां बना / ओके

play08:57

यह फाi आई कैन को हम इग्नोर कर सकते हैं

play08:59

ओके तो हम इस पाव आइकन को इग्नोर कर देते

play09:01

कम करते हैं यहां पर एक वो कर देते हैं

play09:04

यहां पर हम एक ऐप दल देते हैं डेट अगर

play09:05

रिक्वेस्ट डॉट यू आर एल इस इक्वल्स तू

play09:09

इक्वल तू फाइव आई कनॉट आय को तो मतलब

play09:12

रिटर्न कर दो एक रिस्पांस डॉट एंड

play09:14

रिस्पांस डॉट एंड गर्ल ठीक है तो मुझे

play09:16

उसको ना लोग नहीं करना तो हमें अपने सर्वर

play09:18

को रिचार्ज करना होगा तो एक बार दोबारा से

play09:21

करते हैं तो मैं इसको रिमूव कर देता हूं

play09:22

से मैं यहां पे करूंगा रिफ्रेश तो सबसे

play09:25

पहले हमारी एक रिक्वेस्ट है मतलब क्या

play09:27

होता है डेट इट्स अन होम पेज इट्स अन रूट

play09:29

ठीक है तो उसे केस में हम क्या कर रहे हैं

play09:32

रिस्पांस सिंक होम पेज तो हमारा होम पेज

play09:35

यहां पर लिखा गया

play09:36

बहुत बढ़िया उसके बाद अगर मैं यहां पर

play09:39

लिखता हूं स्लैश अबाउट इंटर करता हूं

play09:47

एचटीटीपी मॉड्यूल जो जिस पथ पे हम

play09:50

रिक्वेस्ट करते हैं ना उसको रिक्वेस्ट

play09:51

यूआरएल में दल के दे देता है ठीक है तो

play09:53

अभी रिक्वेस्ट आया है तो स्लैश अबाउट के

play09:57

ऊपर हमने इसको हैंडल कर लिया बहुत बढ़िया

play09:58

बहुत अगर मैं यहां पे लिखूं क्वेश्चन

play10:01

मार्क यानी की मैंने क्वेरी पैरामीटर्स

play10:03

स्टार्ट हो रहे हैं अब मैं यहां पे

play10:04

बोलूंगा माय नाम ओके मैंने यहां पे बोला

play10:07

माय नाम इसे लेट ऐसे मैंने बोला पियूष

play10:11

इंटर तो यहां पर यू कैन सी डेट हुआ क्या

play10:14

यहां पर 44 नोट फोन आया करेक्ट

play10:18

में जाता हूं तो इस तरह का मेरा एक पास है

play10:21

इस तरह का मेरा एक बात बना की जिसमें

play10:24

स्लैश अबाउट पथ दें सी हैव कोई भी

play10:26

पैरामीटर्स एंड उसके बाद माय नाम इसे अलसो

play10:28

पियूष

play10:29

तो यहां पर हुआ क्या

play10:36

पास नहीं करता ठीक है इसको नहीं पता की

play10:39

क्वेश्चन मार्क से पहले इसको सेपरेट आउट

play10:41

करना है उसके बाद ये मेरा पथ होगा और ये

play10:43

मेरे क्वेरी पैरामीटर्स होंगे ठीक है

play10:45

तो इसके लिए हमें क्या करना पड़ता हमें एक

play10:47

एक्सटर्नल पैकेज का उसे करना पड़ता है ठीक

play10:49

है तो वो मतलब दिखाता हूं इफ यू गो तू

play10:51

npmgs.com तो ये एक वेबसाइट है npmgs.com

play10:55

लेटेस्ट गो तू npmgs.com तो ये वो इसको

play10:58

बोलते है नोट पैक नोट पैकेज मैनेजर

play11:01

जावास्क्रिप्ट तो यहां पर वो सारे पैकेजेस

play11:04

है जिसको मैं अपने नोट्स अगर मैं इंस्टॉल

play11:06

कर सकता हूं तो यहां पे कम करते हैं यहां

play11:08

पर एक पैकेज को सर्च करते हैं यू ए रहा है

play11:09

ठीक है तो मैंने पैकेज को सर्च किया

play11:11

यूआरएल तो ये एक पैकेट है यूआरएल ये कहता

play11:13

है तो यहां पे देखते हैं यूआरएल क्या करता

play11:15

है वो बोलता है डेट अगर तुम्हारा ये

play11:17

यूआरएल है ना तो इस यूआरएल को मैं क्या

play11:19

करूंगा मैं तुम्हें कन्वर्ट कर दूंगा डेट

play11:21

इस प्रोटोकॉल क्या है इसका होस्ट क्या है

play11:23

इसका अर्थ क्या है तो मतलब एवरीथिंग ये

play11:24

हमारे लिए पार्सल के देगा तो इसको इंस्टॉल

play11:26

कर लेते हैं ठीक है तो इंस्टॉल का मैन

play11:28

क्या नम इंस्टॉल

play11:34

ठीक है तो तुम इसको इंस्टॉल भी लिख सकते

play11:36

हो तुम इसको सिंपल आए भी ले सकते हो एंड

play11:38

यू आर एल ये क्या करेगा

play11:41

ठीक है एंड ये हमारे लिए पैकेट इंस्टॉल कर

play11:44

लेगा अब इसने किया होगा इसने पहले तो

play11:47

पैकेज के अंदर एक डिपेंडेंसी बना दी होगी

play11:49

यूआरएल ठीक है ऑटोमेटेकली तो इसमें क्या

play11:52

किया एक डिपेंडेंसी बना दिया यूआरएल और

play11:54

इसका ये वर्जन ले आया 24 का वर्जन क्या है

play11:56

जीरो पॉइंट 11.0 सो 0.11.0

play12:00

और यहां पर एक नोट मॉडल्स का फोल्डर बन

play12:03

गया ये फोल्डर के अंदर एक्चुअल कोड है इस

play12:07

पार्टिकुलर लाइब्रेरी का तो जो हमें अभी

play12:08

हमने ये लाइब्रेरी इंस्टॉल की ना इसका जो

play12:11

कोड है वो मॉडल्स में ए गया

play12:14

अच्छा व्हाट टाइप मैं इसको डिलीट कर डन

play12:15

मैंने गलती से नो मॉडल डिलीट कर दिया

play12:17

करेक्ट अब हुआ क्या वो जो यूआरएल पैकेज का

play12:20

कोर्स है वो डिलीट हो गया तो मैं क्या

play12:22

करूंगा मैं यहां पे बोलूंगा एनबीएम

play12:24

इंस्टॉल सिर्फ ठीक है तो ये क्या करेगा ये

play12:27

ना मेरी डिपेंडेंसी

play12:29

यूआरएल उसे कर रहे द तो जैसे ये क्या

play12:31

करेगा देखिएगा नोट मॉडल नहीं है और उसको

play12:33

मेरे लिए इंस्टॉल दोबारा कर देगा तो ये

play12:35

दोबारा से इंस्टॉल हो गया ठीक है तो मतलब

play12:37

की यहां पर होना जरूरी है डिपेंडेंसी में

play12:39

होना जरूरी है एमपी में सवाल अपने आप मेरे

play12:41

लिए वो पार्टिकुलर पैकेज इंस्टॉल

play13:14

है तो यहां पर मैंने यूआरएल को इंस्टॉल कर

play13:16

लिया जस्ट ए सेकंड तो यहां पर मैंने

play13:18

यूआरएल को इंस्टॉल कर लिया तो मैंने इसको

play13:20

इंपोर्ट कर लिया अब मैं क्या बोलूंगा मैं

play13:21

यहां पे बोलूंगा यहां पे मैं बोलूंगा कैसे

play13:25

माय यूआरएल =

play13:27

यूआरएल

play13:30

और इसके अंदर में अपना जो रिक्वेस्ट

play13:32

यूआरएल है ना ये पास कर दूंगा ठीक है अब

play13:35

यहां पे कंसोल डॉट लॉक करते हैं माय

play13:37

यूआरएल को सो कंसोल डॉट लोग माय यूआरएल तो

play13:40

देखते हैं मैं यूआरएल को किस तरह से पास

play13:42

करता है तो नम स्टार्ट करके हम अपने सर्वर

play13:44

को स्टार्ट कर लेते हैं तो इसी पे

play13:46

तुम्हारा एक रिक्वेस्ट करते हैं तो क्या

play13:48

सो लेट अस सी डेट क्या दे रहा है ये दे

play13:50

रहा है प्रोटोकॉल नल प्रोटोकॉल नल क्यों

play13:52

है बिकॉज मैं लोकल होस्ट के ऊपर हूं

play13:54

करेक्ट स्लैश स्पोर्ट्स सब कुछ नल है कोई

play13:57

बात नहीं तो यहां पर अगर मैं इसको जूम

play14:00

करता हूं सो यू कैन सी डेट क्या कुछ है

play14:03

ठीक है फुल पथ क्या है

play14:06

यह पूरा पत्थर ठीक है

play14:12

इसने क्या किया

play14:14

पथ ने मुझे दे दिया स्लैश अबाउट

play14:18

पियूष और सर्च में इसमें आगे इट इस मेरे

play14:21

को वो चीज दे दी करेक्ट अच्छा वाटर अगर

play14:23

मेरे पास मल्टीपल होते हैं मतलब मैं यहां

play14:25

पे लिखता एंड मेरी यूजर आईडी = 1 तो देखते

play14:28

हैं क्या करता तो इसने क्या किया इसने

play14:32

इसने कोइरी दे दिया माय नाम बिकॉज ऑफ

play14:35

पियूष एंड यूजर आईडी वैन पार्ट नाम दे

play14:37

दिया उसके बाद ठीक है तो मतलब व्हाट आई

play14:40

कैन डू आय कैन से तो अब इसको थोड़ा सा और

play14:42

अच्छे से करते हैं तो मुझे ये पता है डेट

play14:44

मुझे ना जो ये केस लगाना है रिक्वेस्ट के

play14:47

ऊपर नहीं लगाना मुझे इसको पथ नाम के ऊपर

play14:48

लगाना है तो मैं करके बोलूंगा मैं इसको

play14:50

बोलूंगा डेट जो भी मेरा लेना माय यूआरएल

play14:53

डॉट पार्ट नाम ठीक है तो अब क्या होगा एवं

play14:57

पासिंग डोंट फॉरगेट तू रिचार्ज ठीक है तो

play15:00

हम अपने स्टार्ट कर लेते हैं तो क्या होगा

play15:03

अगर मैं इसको रिफ्रेश करता हूं तो इनफेक्ट

play15:05

मेरे पास यहां पर पूरा पथ है आई एम हेविंग

play15:08

dispatth नाम लेकिन फिर भी मेरा जो

play15:10

रिक्वेस्ट है वो स्लैश अबाउट के ऊपर जा

play15:11

रही है ठीक है बिकॉज मैंने उसमें से

play15:13

एक्सट्रैक्ट कर लिया है तो लोग देखोगे तो

play15:15

लोग तो यह लॉक तो यह पूरा बन रहा है लेकिन

play15:18

फिर भी मैं अपने पास पे जा का रहा हूं ठीक

play15:20

है अब मुझे क्या करना है ना मुझे देखना है

play15:22

डेट यूजर है ना ये वैरियेबल्स कैसे पास

play15:24

किया जैसे माय नाम इस अलसो पियूष एंड यूजर

play15:26

आईडी वैन तो मैं क्या करूंगा तुम्हें यहां

play15:28

पर ऐसा कुछ कर सकता हूं क्या मतलब आई गो

play15:30

तू डॉक्यूमेंटेशन तो ये हमारी

play15:31

डॉक्यूमेंटेशन है तो फॉर एग्जांपल मुझे

play15:34

यहां पर कोई पैरामीटर चाहिए ठीक है तो

play15:36

देखते हैं कैसे कर सकते हैं तो मैं यहां

play15:38

पे बोल सकता हूं कॉस्ट

play15:39

कप मतलब क्वेरी पैरामीटर्स = तो यहां पर

play15:42

मैं क्या कर सकता हूं अगर तो मैं इस

play15:44

पार्ट्स में जाते हो सो यू कैन सी डेट

play15:45

यहां पर एक पैरामीटर होता है parsquare

play15:47

स्ट्रिंग तो मैं यहां पे बोलूंगा ट्रू ठीक

play15:48

है तो मैंने कुछ नहीं किया मैंने यहां पे

play15:50

ट्रू पास कर दिया इसका मतलब मैं इसको बोल

play15:52

रहा हूं की यार मेरे को ना कोई पैरामीटर

play15:53

स्ट्रिंग्स को भी बाहर करना है अब दोबारा

play15:55

से मम स्टार्ट करते हैं अब देखना क्या

play15:56

होगा तो मैं इसको एक्सपेंड कर लेता हूं अब

play15:59

अगर मैं रिफ्रेश करता हूं तो हमारे पास

play16:01

क्या ए रहा है हमारे पास एक कोई भी ए रहा

play16:03

है जिसके अंदर यू कैन सी सी हैव माय नाम

play16:06

पियूष यूजर आईडी वैन तो इसमें मतलब मेरे

play16:09

लिए डिफरेंट कर दिया उसको अपने पास कर

play16:11

दिया करें तो यानी की अगर मैं यहां पे और

play16:13

भी पास करता हूं आई कैन से एंड सर्च

play16:20

में रही है माय नाम यूजर आईडी सर्च बहुत

play16:24

बढ़िया

play16:25

से तो मैं क्वेरी पैरामीटर में जाऊंगा तो

play16:28

नॉट लाइक दिस तो एल से क्वेरी पैरामीटर =

play16:31

माय यूआरएल माय या फिर हम यहां पे बोलते

play16:35

हैं की कौन यूजर है जो रिक्वेस्ट करें तो

play16:37

यूजर का नाम क्या है तो मैं इसको बोलूंगा

play16:39

माय यूआरएल डॉट उसके बाद कोई भी ठीक है और

play16:45

फिर मैं क्या कर सकता हूं इसका नाम क्या

play16:47

था क्वेरी डॉट माय नाम ठीक है तो डॉट माय

play16:50

नाम ले लूंगा एंड मैं सेंड किया करूंगा

play16:52

मैं बोलूंगा हे

play16:55

और उसके बाद यूजर का

play16:59

रिचार्ज

play17:05

वो देता हमें जॉन तो यहां पर क्या आता हे

play17:08

जॉन ठीक है तो सिमिलरली गूगल क्या कर रहा

play17:12

होगा वो यहां से कर रहा होगा माय

play17:13

url.co.in सर्च ठीक है मतलब वो क्यों राइट

play17:17

गूगल के केस में हमारे पास क्या था के था

play17:18

एंड इफ यू रिमेंबर यूट्यूब के केस में

play17:20

हमारे पास क्या था सर्च अंडरस्कोर

play17:22

रिजल्ट्स तो यूट्यूब का सर्वर क्या कर रहा

play17:24

होगा वो कुछ इस तरह से कर रहा होगा डेट

play17:25

उसने एक पंच बनाया होगा तो उसने केस बनाया

play17:27

होगा स्लैश सर्च ठीक है स्लैश सर्च इसमें

play17:32

उसने क्या किया होगा उसने बोला होगा कॉस्ट

play17:33

की व्हाट यूजर वांट्स तू सर्च तो मैं मतलब

play17:36

यूजर ने क्या सर्च किया तो वो बोलेगा माय

play17:38

क्वेरी माय यूआरएल ठीक है उसके बाद डॉट सो

play17:42

यू आर एल क्या जा रहा है सर्च अंडरस्कोर

play17:44

क्वेरी सो सर्च अंडर स्कोर

play17:48

यहां पर डेटाबेस में से सर्च का वो किया

play17:51

होगा ठीक है डाटा इसमें क्या होगा जो भी

play17:52

उसने सर्च किया वो फाइंड करके फिर उसने कर

play17:54

दिया होगा रेस डॉट एंड

play17:57

तो response.in

play18:08

इसका मतलब क्या बन रहा है तो मतलब की अगर

play18:11

ये यूट्यूब है तो कुछ इस तरह से होगा की

play18:13

तुम सर्च पर गए ठीक है एस ए ए आर सी ह

play18:16

क्वेश्चन मार्क उसके बाद तुमने सर्च

play18:18

क्वेरी डाला ठीक है तो तुमने क्या डाला

play18:20

सर्च क्वेरी इकोसी जावास्क्रिप्ट

play18:23

जावास्क्रिप्ट प्लस टिक प्लस तक प्लस तू

play18:29

और तुमने इसको इंटर कर दिया सो हेयर आई

play18:32

हैव सर्च रिजल्ट फॉर जावा स्क्रिप्ट ठीक

play18:35

है तो यहां पे भी प्लस कर देते हैं

play18:41

बिकॉज प्लस का मतलब क्या होता है

play18:44

तो इस तरह से जो हमारा है इस तरह से जो

play18:48

गूगल का सर्वर है इस तरह से हम चीजों को

play18:50

हैंडल करते हैं ठीक है तो हमारे पास बात

play18:52

होता है हमारे पास कोई भी पैरामीटर्स होते

play18:55

हैं सो एक बार रिवाइज कर लेते सामने क्या

play18:58

दिखाई वॉरेन के बारे में सो यूआरएल क्या

play19:00

होता है हमारे पास जो यूआरएल होता है वो

play19:01

तो यूनिफॉर्म रिसोर्स लोकेटर हमारे पास एक

play19:04

प्रोटोकॉल होता है हमारे पास डोमेन होता

play19:05

है लास्ट में हमारे पास क्या होता है पथ

play19:07

तो ये पथ कुछ भी हो सकता है स्लैश अबाउट

play19:09

पास हो सकता है स्लैश कॉन्टैक्ट अस सेक पथ

play19:11

हो सकता है स्लैश प्रोजेक्ट स्लैश वैन एक

play19:13

पथ हो सकता है उसके बाद हमारे पास आते हैं

play19:15

क्वेरी पैरामीटर्स जो बेसिकली की वैल्यू

play19:17

पर्स होते हैं क्वेश्चन मार्क से हम इसको

play19:19

स्टार्ट करते हैं एंड से हम इसको सेपरेट

play19:21

आउट करते हैं ओके सो दिस वैसे ऑल अबाउट

play19:24

दिस वीडियो जिसमें हमने देखा था की यूआरएल

play19:26

कैसे कम करता है तो अगर तुम अपना एक कवर

play19:28

बना रहे हो इन एचडी टीवी ओके इन एचडी टीवी

play19:30

तो हम क्या कर सकते हैं हम बेसिकली यहां

play19:32

पे केसेस एड कर सकते हैं करेक्ट जितना भी

play19:35

मेरे फंक्शनैलिटी जितने भी मेरे पेज

play19:37

अवेलेबल है तो मैं उन सबकी एक स्विच केस

play19:38

बना सकता हूं उसके बाद में जो भी मेरे को

play19:40

कोई पैरामीटर्स चाहिए मैं उनको एक्स्ट्रा

play19:42

डाउट करके उसके बेसिस पे मैं अपने डेटाबेस

play19:44

के साथ कुछ भी इंटरेक्ट करके मैं अपने

play19:46

डाटा को सेंड कर सकता हूं सो दिस इसे हो

play19:48

अन बेसिक

play19:50

फॉर्म्स ओवर की क्या होती है

play19:54

डेट यूजर एक्चुअली में चाहता के डाटा

play19:57

इसमें से डाटा को लेकर यूजर को वापस करना

play20:00

तो यह हमारा पूरा कम होता है तो ये हमारा

play20:03

पूरा कोड है तो हम अभी क्या कर रहे हैं तो

play20:05

हम को इग्नोर कर रहे हैं तो वो मैं भगत

play20:07

हूं क्यों तो पहले हम एक ब्लॉग बनाते हैं

play20:09

हम अपने यूआरएल को पार्ट्स करते हैं हम

play20:11

फाइल के अंदर किस तरह का लोग आया तो ये

play20:13

हमारा पूरा लोग बन रहा है यू कैन सी डेट

play20:15

ये हमारा पूरा लॉक है करेक्ट एंड उसके बाद

play20:18

हम क्या करते हैं हम उसे यूआरएल को हम उसे

play20:21

बेसिकली यूआरएल को हैंडल करके रिस्पांस को

play20:23

सेंड कर देते हैं तो ये इस तरह से हमारा

play20:25

पूरा शो और कम करता है सो थॉट्स ऑल फॉर

play20:28

दिस वीडियो आई होप तुम्हें वीडियो अच्छा

play20:30

लगा होगा वीडियो अच्छा लगा तो लाइक एंड

play20:32

सब्सक्राइब जरूर करना मिलते हैं आपको

play20:33

नेक्स्ट वीडियो में अंटील दें बाय टेक

play20:36

केयर

Rate This

5.0 / 5 (0 votes)

¿Necesitas un resumen en inglés?