How to Access Application Localhost from Anywhere | Localhost Website from another Computer

Dare2DoEngineering
16 Jul 202008:15

Summary

TLDRIn this video, the creator demonstrates how to share a locally hosted website on any device, such as a mobile phone, using the tool Ngrok. He explains the step-by-step process of setting up Ngrok, running it via command prompt, and generating a shareable link for website demos. The video provides a practical solution for showing website demos without the need for hosting costs. The creator also emphasizes key points like keeping the command prompt and local server running during demos. The video is geared towards web developers and students needing to showcase their projects.

Takeaways

  • 👋 Welcome to my YouTube channel! Today, I'll show you how to display a local website on any mobile device for a demo.
  • 💡 The issue is that hosting a website for a demo can cost money, especially if the client decides not to proceed after seeing it.
  • 📲 I will demonstrate how to show your locally hosted website on Android or any other device using ngrok without hosting expenses.
  • 🌐 This method allows you to share a local website for testing and demos without worrying about hosting costs or downtime.
  • 🔧 First, go to Google Chrome and type 'ngrok' to get started. Download ngrok for your system and unzip the file.
  • 🖥️ After unzipping, run the ngrok command through CMD by navigating to the directory where ngrok is stored.
  • 🔑 The ngrok command will generate a unique URL that you can share with anyone to view your local website online.
  • 📱 You can copy and share this ngrok-generated URL on platforms like WhatsApp to showcase your website on mobile devices.
  • ⚠️ Make sure not to close the CMD or stop the local server running the website, or the ngrok URL will stop working.
  • 👍 If the connection is closed, a new link will be generated, and you'll have to share the new link again.

Q & A

  • What is the primary purpose of this video?

    -The primary purpose of this video is to explain how to show a local website on a mobile device or any other device using the ngrok service without the need for hosting, which can save hosting costs for demo purposes.

  • Why does the creator recommend using ngrok?

    -The creator recommends using ngrok because it allows users to show their local websites to others without hosting the site online, which saves money. This is especially helpful for demoing websites.

  • What is the significance of the number '3705' mentioned in the video?

    -The number '3705' refers to the port number of the local server where the website is being hosted. It is important for the user to remember this number to access the website through ngrok.

  • What initial steps are needed to set up ngrok on a Windows machine?

    -The user needs to go to Google Chrome, search for 'ngrok,' sign up or sign in to the ngrok website, download the ngrok ZIP file, extract it, and open the command prompt to set up the local server with the provided commands.

  • What is the key command used to start ngrok and why is it important?

    -The key command is 'ngrok http [your port number]'. This command is important because it connects the local server to a public URL, allowing others to access the website.

  • What happens if the user closes the command prompt or local server after starting ngrok?

    -If the command prompt or local server is closed, the link generated by ngrok will stop working. A new link must be generated if the user needs to show the demo again.

  • Why does the creator mention using WhatsApp in the video?

    -The creator mentions WhatsApp to demonstrate how the ngrok link can be shared with others. By sharing the link via WhatsApp, anyone with the link can view the local website remotely.

  • How can the ngrok-generated link be useful for mobile device testing?

    -The ngrok-generated link allows users to see how their local website will look and function on a mobile device, making it easy to test design responsiveness and functionality on phones.

  • What is the recommended action if the ngrok link stops working?

    -If the ngrok link stops working, the user should restart the command prompt and rerun the ngrok command. A new link will be generated, which can then be shared.

  • What additional help does the creator offer in case viewers face issues with website development?

    -The creator encourages viewers to comment or send direct messages on Instagram or Facebook if they encounter any issues related to website development, offering to provide further assistance.

Outlines

00:00

📱 How to Show a Localhost Website on Mobile

The creator begins by welcoming viewers and explains how to show a local website on a mobile device or any other device. This approach is useful for demonstrating a local website without hosting costs. The video covers the entire process of setting up a local server, including downloading and using Ngrok, to provide a temporary URL that others can access. The creator provides step-by-step guidance, from downloading Ngrok to running commands in the Command Prompt, ensuring the local website can be viewed on an Android device. The creator highlights important points, such as keeping the CMD and local application open while sharing the demo link.

05:02

🖥️ Running the Website Demo and Important Tips

In the next step, the creator demonstrates running the demo on a mobile device by copying and pasting the generated link. The video shows that the local website is visible on the phone, proving the effectiveness of the method. The creator emphasizes the importance of not closing the Command Prompt or the localhost application while the link is active, as closing them will stop the website from being accessible. If closed, a new link will need to be generated. The creator concludes by offering to provide the used commands in the video description and encourages viewers to subscribe for more website-related tips.

Mindmap

Keywords

💡Localhost

Localhost refers to the local server environment on a user's computer or device where web development can be done without publishing it online. In the video, the presenter talks about showing a website from localhost to others without needing to host it, which saves hosting costs.

💡NGROK

NGROK is a tool that allows developers to expose a local server to the internet via a secure URL. In the video, the presenter demonstrates how to use NGROK to make a locally-hosted website visible on any device, including mobile phones, for demo purposes.

💡CMD (Command Prompt)

CMD, or Command Prompt, is a command-line interpreter in Windows. It is used in the video to run commands to navigate directories, execute NGROK, and set up the local server. The presenter explains how to copy the directory path and run specific commands in CMD.

💡Website Demo

A website demo is a demonstration of a website’s functionality and design to potential clients or stakeholders. The video explains how to provide a live demo of a website hosted locally by using tools like NGROK, saving on hosting costs during the demo process.

💡Hosting Costs

Hosting costs refer to the fees incurred to store a website on a server so that it can be accessed online. The presenter discusses how using NGROK helps avoid hosting costs by allowing a local server to be used for demonstrations instead of paying for online hosting.

💡Port Number

A port number is a numeric identifier for specific processes or services on a device, allowing data to be sent and received. In the video, the presenter instructs how to specify the port number for NGROK to use when exposing the local website.

💡Unzipping

Unzipping refers to extracting files from a compressed folder (ZIP file). In the video, the presenter mentions downloading and unzipping the NGROK file as a preparatory step before using it to set up the local server for the website.

💡HTTP/HTTPS

HTTP (HyperText Transfer Protocol) and HTTPS (HTTP Secure) are protocols used for transmitting data over the internet. In the video, the presenter shows how NGROK provides both HTTP and HTTPS links to share the locally hosted website securely.

💡Mobile Device Compatibility

Mobile device compatibility refers to how well a website or application functions on mobile devices. The video highlights the importance of testing the locally hosted website on mobile devices to ensure the design and functionality work properly before presenting it.

💡Control+C (Ctrl+C)

Control+C (Ctrl+C) is a keyboard command used to stop a process in CMD or other terminal windows. The presenter uses this to terminate the NGROK session, warning that doing so will stop the local website from being available via the shared link.

Highlights

Introduction to showing local websites on any device without hosting costs.

Explanation of the challenges of showing website demos without incurring hosting fees.

Demonstration of using Ngrok to show local websites on Android or any mobile device.

Step-by-step instructions on downloading Ngrok and setting it up.

Details on unzipping the downloaded file and running the Ngrok command in CMD.

Explanation of how to copy and paste the directory path in CMD for proper execution.

Description of how to generate a unique URL to share the local website demo with others.

Important note: Do not close the CMD or local application during the demo, as it will interrupt the website display.

Emphasis on how to handle errors if the Ngrok command does not work properly.

Solution for running Ngrok with proper port numbers and avoiding connection issues.

Demonstration of showing the website demo on a mobile phone by sharing the generated URL.

Reminder that if CMD is closed, a new link will need to be generated for the demo.

Clear explanation of the process to troubleshoot and regenerate links if needed.

Encouragement to ask questions and comment if users encounter problems during the process.

Final invitation to subscribe for more videos related to website development and solutions.

Transcripts

play00:00

हेलो हेलो व्यूअर्स वेलकम टू माय YouTube

play00:02

चैनल तो कैसे हैं आप लोग आज मैं आपको अपने

play00:05

लोकल उसके वेबसाइट को मोबाइल पर या किसी

play00:08

भी रेंडम किसी भी डिवाइस पर कैसे दिखें वह

play00:11

मैं आपको करके बताने वाला हूं और यह इसलिए

play00:14

यूज होता है क्योंकि कभी भी आप क्या चाहते

play00:17

हैं कि आप अपने लोकल उसके वेबसाइट को

play00:19

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

play00:21

और अगर आप पहले से ही उस को होस्ट करते

play00:24

हैं उसमें पोस्टिंग का खर्चा आ जाता है और

play00:26

जो कि आप बिल्कुल नहीं चाहेंगे और अगर

play00:28

उसने मना कर दिया डेमो देखने के बाद में

play00:31

तो फिर क्या होता है कि आपको वहां

play00:32

पोस्टिंग डोरमेंट का चार्ज क्या हो जाता

play00:34

है लो हो जाता है तो वहां पर आप क्या

play00:36

चाहते हैं कि लोकलहोस्ट पहले वेबसाइट और

play00:39

किसी को आप शो कर सकें कि मेरा वेबसाइट

play00:42

ऐसे ठीक है वह मैं आपको आज इसी प्रॉब्लम

play00:45

का सलूशन दिखाने वाला तो गाइस लेट्स बीइंग

play00:48

सो फ्रेंड्स मेरा वेबसाइट है जो कि मैंने

play00:51

बनाया था अपने फाइनल ईयर प्रोजेक्ट में और

play00:53

इसी को मैं आपको करके दिखाने वाला हूं कि

play00:55

कैसे इसको किसी भी Android डिवाइस पर यह

play00:58

मोबाइल पर कहीं भी कैसे शोक

play01:00

जे वीडियो फ्रेंड्स यहां के लोग लास्ट

play01:02

मुंबई एयरपोर्ट नंबर ध्यान रखिएगा 3705 यह

play01:05

जो बेवफा है वह मेरा 370 नंबर पर चल रहा

play01:09

है ठीक है यह याद रखिएगा कि कोई और

play01:11

एप्लीकेशन इसी पॉइंट पर नाचे है सिर्फ यही

play01:14

एप्लीकेशन चल रहा हूं ठीक है फ्रेंड्स अब

play01:16

हम यह सबसे पहले

play01:18

झाल ओम

play01:20

अपने देखिए आपको जाना है गूगल क्रोम पर

play01:23

रूम पर जाकर टाइप करना है एनसीआर के डाटा

play01:27

से ठीक है यहां पर आपको जाना है ठीक है

play01:31

फ्रेंड्स थैंक यू फ्रेंड्स हम उसे वेबसाइट

play01:33

पर आ गए यहां आपको सिंपली यहां पर क्लिक

play01:35

कर लें गेट स्टार्टेड 1431 फ्रेंड्स यह

play01:39

मैंने पहले से ही साइन कर रखा है आपको

play01:41

वहां पर साइन करना होगा पहले तो साइनअप कर

play01:44

लीजिएगा फिर साइन कर लीजिएगा उसके बाद में

play01:46

आप इस पेज पर पहुंच जाएंगे डाउनलोड

play01:48

एनजीआरओक कि यहां पर डाउनलोड फॉर विंडो पर

play01:51

क्लिक कर देना है फ्रेंड्स मैंने इसको

play01:53

पहले ही डाउनलोड कर रखा है देखिए मैंने

play01:54

डाउनलोड शोल्डर पर देखिए पहले से ही है

play01:56

यहां पर यह जो पॉइंट होगा टीचर फ्रेंड्स

play01:59

आप यहां पर डाउनलोड कर लीजिएगा उसके बाद

play02:01

में आपको क्या करना है सबसे पहले वहां पर

play02:03

जाकर अनजिप करना है जिसे देखिए मेरा एक

play02:07

डाउनलोड फोल्डर में लिखा तो आपको यहां पर

play02:10

देखिए फ्रेंड्स यहां पर मेरा डाउनलोड

play02:11

फोल्डर है ठीक है यहां पर ज़िप फाइल में

play02:14

इसको मैंने क्या-क्या पहले अनजिप किया

play02:15

अंतत करने के बाद मैं आपको मिलेगा यह

play02:17

फोल्डर एनजीआरओक स्टेबल विंड तो यह एंड

play02:19

सिक्सटी

play02:20

और यहां पर आपको क्लिक कर लेना है

play02:23

और यहां पर आपको क्लिक करने के बाद में यह

play02:25

डॉट एस सी का शोल्डर लेना इस पर वह किस

play02:28

नहीं करना है सिंपली का करना है ऊपर में

play02:30

जो है पास व्यापक जीवन है इसको जाते यहां

play02:32

पर कॉपी कर लेना यह कॉपी करने के बाद में

play02:35

आपको अपना कमेंट फ्रॉम खोलना है सीएमडी

play02:39

टाइप किया मैंने उसके बाद देखिए यहां पर

play02:43

आपको करना है पहले उस डायरी में चले जाना

play02:46

है तो क्या कमाने सीडी पेश करके वह पात का

play02:49

नाम तक यहां पर मेरे पास कॉपी कर लिया व

play02:52

स्वास्थ्य जाने के बाद में यह डायरेक्टरी

play02:54

में पहुंच गए ठीक है फ्रेंड्स अब देखिए

play02:56

उसके बाद में क्या कह रहा है इसके बारे

play02:58

में कहना है कि यह

play03:00

कि यह आपको कॉपी करके वहां पर चलाना है रन

play03:03

करने देखिए तो ए यारों के और यह सब का

play03:06

यूनिक होता है तो कल

play03:09

कि रमेश को कॉपी कर लेता हूं

play03:12

हुआ था यहां पर पेस्ट कर दिया यह पेश करने

play03:16

के बाद में एंटर कर देता हूं एंटर कर दिया

play03:19

आपको यही आ जाएगा मैसेज उसके बाद में

play03:21

नेक्स्ट स्टेप देख लेते हैं

play03:23

हैं नेक्स्ट स्टेप क्या कह रहा है

play03:24

एनजीआरओक टेस्टी पीठ लिखे गए पोर्ट नंबर

play03:28

है यह आपको यहां पर रन करना है लेकिन

play03:31

फ्रेंड्स क्या हुआ था जब मैं इसको कर रहा

play03:33

था तो यहां पर यहीं चीज मैंने वहां पर

play03:36

कमेंट प्रॉपर अंधेरा था पर क्या हुआ था कि

play03:38

मैं रह नहीं किया था मेरा जो है वह नहीं

play03:41

चल रहा था तो इसका सलूशन मुझे सर्च करने

play03:44

पर मिला और वह जो कमान है वह है मैं आपको

play03:47

दिखाता हूं देखिए एनजीआरओक वैस्टीज पे वोट

play03:53

डाल दें फिर होस्ट है डर इक्वल टू लो कर

play03:56

ऑस्कर अवार्ड ठीक यह आपको कमांड वहां पर

play04:00

एंटर कर

play04:01

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

play04:03

यहां पर मैंने एंटर कर दिया जहां रिपोर्ट

play04:06

लिखवा दूंगा यह है

play04:09

इस वीडियो में शुरू में याद किया था उसको

play04:11

मेरा 3705 आप अपने वेबसाइट का पोर्ट नंबर

play04:15

डालना है

play04:20

कि यह फ्रेंड्स यह मैं कर दिया यहां पर

play04:22

अपना एंटर कर देना है एंटर करने के बाद

play04:25

देखिए यहां पर ऑनलाइन स्टेटस आ गया वेकेशन

play04:28

स्टेटस ऑनलाइन ठीक है यह मेरा ईमेल ID है

play04:31

यह आप देख प्लान दे रखा है फ्री इससे हम

play04:34

कोई मतलब नहीं आ हम मतलब है इस लिंक से एक

play04:37

है एचटीटीपी एक लिंक है और यह है टीटीपीएस

play04:40

आप समझते हैं कि यह क्या होता है टीबी

play04:43

क्या होता है बस इसको आप को कॉपी करना है

play04:45

यही आपको क्या करना है रन करना है यही

play04:48

लिंक आपको देना है जिसको भी आपको डेमो

play04:50

दिखाना होगा या आपको फोन में देखना होगा

play04:52

कि फोन में क्या होता है कि कभी क्वाथ फोन

play04:55

में आपको देखना होता है कि आपका जो

play04:57

डिजाइनिंग है वह कैसा है तो अगर वह देखना

play04:59

है तू कैसे देखें ठीक है तो आपका इसमें भी

play05:02

यह हेल्प करेगा ठीक है तो इसको मैं

play05:04

नेक्स्ट स्टेप में रन करके देखता हूं

play05:06

लेकिन मिक्सचर खोल लेता हूं

play05:09

कि यहां पर कॉपी पेस्ट कर दिया ठीक है

play05:12

कि डिफरेंट मेरा वेबसाइट है यह जो आपने

play05:15

देखा था मैंने वीडियो को शुरू हुए दही

play05:18

वेबसाइट है जो आपको दिख रहे हैं आप यह

play05:20

फ्रेंड्स यह इससे वेबसाइट यह देखिए इस

play05:23

टाइम में भी मेरा सिम वेबसाइट देख लो

play05:25

कल्लो स्टिकर यहां पर और यहां पर इसका

play05:27

लिंक देख रहा है यहां पर देखिए फ्रेंड्स

play05:29

एकदम वहीं वेबसाइट है और फ्रेंड्स मैं

play05:33

आपको अपने मोबाइल पर शो करता हूं मैं इस

play05:35

लिंक को कॉपी

play05:39

हुआ है

play05:47

अब यह देखिए मैंने यह व्हाट्सएप खोल लिया

play05:49

और यहां पर मेरा यह लिंक आ गया मेंबर्स

play05:51

किसी लिंक को क्लिक कर देता हूं

play05:54

है कि लोड हो रहा है

play05:57

यह देखिए फ्रेंड्स यह वेबसाइट है लेकिन यह

play06:00

फोन पर भी प्रैंक कर रहा है

play06:05

हुआ था यह फ्रेंड्स बहुत ही इजी मेथड आप

play06:09

इसको किसी को भी डेमो दिखा सकते हैं और

play06:11

सबसे इंपोर्टेंट बात आपको मैं यह कहना

play06:13

चाहूंगा कि आप जब स्वीट डेमो के दिखाएंगे

play06:15

या वेबसाइट को रन करेंगे इस लिंक पर तो

play06:18

इसका मान फ्रॉम को क्लोज नहीं कीजिए का यह

play06:21

फ्रेंड्स इसका बालों को अगर क्लोज कर

play06:23

देंगे तो यह नहीं होगा और आपको एक और काम

play06:25

करना है कि जो आपने लोकल पुष्पि एप्लीकेशन

play06:29

को रन किया है इसको भी रोज नहीं करना है

play06:30

अगर आप ऐसा करेंगे यह क्या होगा कि इस

play06:33

लिंक पर वह वेबसाइट रजिस्टर नहीं होगा और

play06:36

वह वेबसाइट रजिस्टर नहीं होगा तो फिर उस

play06:38

पर क्या होगा कि आपका वह वेबसाइट रन नहीं

play06:40

होगा यह गलती आपको नहीं करनी है और अगर आप

play06:43

इसको क्लोज कर देते हैं और फिर से अगर यही

play06:46

काम करते हैं तो आपको क्या हुआ नया लिस्ट

play06:48

जनरेट हो सकता है ठीक है नया लिंग जनरेट

play06:51

होगा फिर आपको वह लिंक शेयर करना पड़ेगा

play06:54

तो फ्रेंड्स मैं आपको यह भी करके दिखा

play06:56

देता हूं कि कमांड प्रोंप्ट लॉस करने के

play06:57

बाद में क्या होता है इसलिए के साथ में

play06:59

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

play07:01

कर कंट्रोल सी दबा लें यहां पर और यह

play07:04

क्लोज

play07:05

अच्छा ठीक है अब यही लिंक मैं दोबारा

play07:07

लौटकर ताह कि मैं यहां तक कि इस लिंक ना

play07:13

इस नोट की रेफ्रेंस सॉफ्ट जो आज हमारा

play07:16

आस्था वह कंपलीट हो चुका है तो बताइए कैसा

play07:20

लगा आपको यह वीडियो अगर यह प्रॉब्लम सॉल्व

play07:22

थम

play07:24

यह बताइए गा और मैंने फ्रेंड्स यहां पर जो

play07:26

कमांड यूज किया था इसका डिस्क्रिप्शन में

play07:29

डाल दूंगा आप वहां से कॉपी पेस्ट कर सकते

play07:31

हैं तो फ्रेंड्स आपको कैसा लगा यह वीडियो

play07:34

अगर यह वीडियो यूज फूल लगी है तो इस

play07:36

वीडियो को लाइक जरूर कीजिएगा और अगर आपको

play07:38

ऐसे ही वेबसाइट के रिलेटिड कोई भी

play07:40

प्रॉब्लम आती है तो इसके लिए मेरे चैनल को

play07:42

सब्सक्राइब जरुर कीजिएगा नीचे रेड वाला

play07:44

बटन है उसको प्रेस जरूर कीजिएगा मैं ऐसी

play07:46

वीडियोस जलता रहता हूं अगर आपको कोई भी

play07:49

टिपिकल स्टार्स लगता है जो कि आपके

play07:51

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

play07:53

उसके लिए मुझे कमेंट सेक्शन में जरूर

play07:54

बताइएगा और डीएम भी कर सकते हैं इन सा

play07:57

हैंडल पर डेड टू इंजर्ड इन पर और आप मेरे

play07:59

फेसबुक पेज को भी लाइक कीजिए लिंक

play08:02

डिस्क्रिप्शन में है तो थैंक यू कैन कीप

play08:04

योर सपोर्ट विद ऊ

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Website Demongrok SetupLocal HostingMobile PreviewAndroid DevicesCMD CommandsTech TutorialWeb DevelopmentFinal Year ProjectEasy Guide
¿Necesitas un resumen en inglés?