You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>**HELP! NEEDS A GOOD DOCUMENTATION [#4](https://github.com/ritwickdey/live-server-web-extension/issues/4)**
2
3
3
-
<hr>
4
+
## Brief Description
5
+
This browser add-on is an extension for a developer tool in VS Code editor ([Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer)). With this add-on installed, along with the VS Code extension, it gives you a functionality to automatically update your website on save; for other files than just `.htm` and `.html`.
4
6
5
-
***Need Help? [Watch Video Tutorial](https://www.youtube.com/watch?v=54wcX1G2GH8)***
7
+
So, more specifically, with this add-on, live reload will also work with the following server-side files like: `PHP`, `Node.js` and `ASP.NET`.
6
8
9
+
<br><hr>
7
10
8
-
***[HELP! NEEDS A GOOD DOCUMENTATION [#4](https://github.com/ritwickdey/live-server-web-extension/issues/4)]***
A browser extension that helps you to live reload feature for dynamic content (PHP, Node.js, ASP.NET -- Whatever, it doesn't matter).
19
+
<br>
13
20
14
-
This extension is for [`Live Server`](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) (VSCode Extension - required v3.0.0+).
21
+
#### The Common Misconceptions
22
+
Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `ASP.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save your server-side code.
15
23
16
-
*[all through you can use the npm package [live-server](https://www.npmjs.com/package/live-server)]*
There are two ways to setup `Live Server Web Extension`.
30
-
31
-
>_[Note: live Server will not able to compile you dynamic pages, you've to use the existing server, live server will help you to reload the pages when you made any change on your code, so that you have not to reload manually browser on every changes]_
* Start `Live Server` (assuming the port of live server is `5500`). This server will be used by the extension to know, if any of the files have changed.
46
-
47
-
* In case of PHP & if you're not using XAMPP or any other tool/server, Open a terminal and navigate to the folder your project lives in (generally index.php lives here..) Start a web server by running `php -S localhost:8000`
48
-
49
-
* Now open pop-up menu of `Live Server Web Extension` and check the option `I don't want proxy setup`. [Follow the screenshot](./img/screenshots/live-server-web-extension-easy-setup.png).
50
-
51
-
* Now at the Actual Server add `http://localhost:8000/`. (In which address your PHP/Node.js is running)
52
-
* Now at the `Live Server` add `http://localhost:5500/`.
53
-
54
-
* Now open up `http://localhost:8000/` in your browser. On every changes, your page will be refreshed automaticly.
**Lorem ipsum dolor** sit amet, consectetur adipisicing elit. Eligendi non quis exercitationem culpa nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus asperiores quasi cupiditate. Voluptatum ducimus voluptates voluptas?
6
+
7
+
<br>
8
+
<br>
9
+
10
+
## Code Insight
11
+
```h
12
+
master/
13
+
┃
14
+
┣━━img/ // Folder with images
15
+
┃
16
+
┣━━popup/ // Folder for the popup page
17
+
┃
18
+
┣━━manifest.json // Initialize extension
19
+
┣━━background.js // Background script
20
+
┗━━reload.js // Reload funcionallity
21
+
```
22
+
23
+
#### manifest.json
24
+
The manifest.json file is a JSON-formatted file, and is the only file that every extension using WebExtension APIs must contain.
25
+
26
+
Using manifest.json, you specify basic metadata about your extension such as the name and version, and can also specify aspects of your extension's functionality, such as background scripts, content scripts, and browser actions.
Background scripts are the place to put code that needs to maintain long-term state, or perform long-term operations, independently of the lifetime of any particular web pages or browser windows.
33
+
34
+
Background scripts are loaded as soon as the extension is loaded and stay loaded until the extension is disabled or uninstalled. You can use any of the WebExtension APIs in the script, as long as you have requested the necessary permissions.
I'm a new to this live server thing but for .html it worked perfectly fine! But now when I want to use it for .php it want's me to download it instead of executing it.
5
+
6
+
How can I fix it?
7
+
8
+
**Answer:**
9
+
1.[The Common Misconceptions](#the-common-misconceptions)
10
+
2. You will need to install a server on your machine or download the necessary requirements. Here is a Stackoverflow question: [PHP server on local machine?](https://stackoverflow.com/questions/1678010/php-server-on-local-machine)
11
+
+ [PHP](http://php.net/downloads.php) (just the preprocessor)
>Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `ASP.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save.
29
+
>
30
+
>The reason I built this browser add-on is to delight the experience of server-side programming. The server-side is heavier than the client-side because it needs a larger server environment to run and preprocess your code in: `php`, `nodejs` and `asp.net`.
>Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `ASP.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save.
4
+
5
+
<br>
6
+
7
+
***Need Help? [Watch Video Tutorial](https://www.youtube.com/watch?v=54wcX1G2GH8)***
8
+
9
+
<br><hr>
10
+
11
+
## There are two ways to setup `Live Server Web Extension`.
12
+
13
+
1.[Direct Setup](#direct-setup) (Easy)
14
+
2.[Proxy Setup](#proxy-setup) (Advanced)
15
+
16
+
<br><hr>
17
+
18
+
## Direct Setup
19
+
20
+
1. Install [VS Code](https://code.visualstudio.com/download) from Microsoft (code editor).
21
+
2. Install VS Code [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) (extension).
22
+
3. Install the browser add-on; [Chrome](https://chrome.google.com/webstore/detail/live-server-web-extension/fiegdmejfepffgpnejdinekhfieaogmj/) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/live-server-web-extension/).
23
+
4. Install and run a server on your machine
24
+
+ [PHP](http://php.net/downloads.php) (just the preprocessor)
0 commit comments