Skip to main content

How to Localhost in laptop

Configure localhost in laptop(linux):
       First of all when i created my website, i am attached a database to the webpage i.e., when a person fills the data in the site it has to go to the database, i will tell in another post how to connect webpage to the database.
Now we came to know what is localhost?
         In my words localhost mean we have to run our website in our computer , and we have to act our computer like a server.In other words a local server which is deployed in your own computer .
 Basic Knowledge:
        To understand this you have a basic knowledge about what is port number and what is ip.
       and how a network is formed .

  •  Step1: open terminal by clicking ctrl+alt+t
  •  Step 2: Change the directory to the folder at where your html files are deployed by clicking cd <folder name> for example : cd web (where your folder present)
  •  Note :- Dont go to the folder , just go to the main folder where the files occured.
  • Step 3:- type" python3 -m http.server "it becomes like this 
  • step 4:- Go to the browser and type "localhost:8000" in first time it sets the default port to 8000 and the next time you have to change the port number  like 8899,4446 like any 4 digit number 
  • Eg : python3 -m http.server 7786 like any thing and in browser you have to check like localhost:7786.
  • And now your html files will load here  and now you are successfully .
  • And if you close the terminal then the server stops running.
  • Now the pyhton can act as a server so you doesn't need any special kind of plugins like apache server etc.

Comments

Popular posts from this blog

how to install flutter in linux mint:

What is Flutter?        Flutter is Google’s portable UI toolkit for building beautiful, natively-compiled applications for mobile, web, and desktop from a single codebase.   And Flutter have Many characteristics and you can see here .  How to Install it in your Linux Machine? You can download the Flutter package here . Extract the file in a separate folder.  cd ~/development  tar xf ~/Downloads/flutter_linux_v1.5.4-hotfix.2-stable.tar.xz Add the flutter tool to your path:  export PATH="$PATH:`pwd`/flutter/bin" And enter the code   flutter precache to check the flutter installed. And Run Flutter Doctor By the command   flutter doctor to see any folder is missing for that. (From Flutter.dev) Android Setup: Download and install the android studio . Start Android Studio, and go through the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK Platform-Tools, and Androi...

How to install Blender 2.80 (beta) in Linux:

About Blender:        Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing and game creation. How to install the beta version: Download the latest version of the blender from here  . It will download an tar.gz folder. Extract the folder . Jump into the folder   and click on the Blender named file it will direct to the latest version but don't click on the blender.desktop file. Then it will open the blender window like this.

AJAX

What is AJAX?                  AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and Java Script. Ajax uses XHTML for content, CSS for presentation, along with Document Object Model and JavaScript for dynamic content display. Conventional web applications transmit information to and from the sever using synchronous requests. It means you fill out a form, hit submit, and get directed to a new page with new information from the server. With AJAX, when you hit submit, JavaScript will make a request to the server, interpret the results, and update the current screen. In the purest sense, the user would never know that anything was even transmitted to the server. XML is commonly used as the format for receiving server data, although any format, including plain text, can be used. AJAX is a web browser technolo...