Live-server

0 views
Skip to first unread message

Herodoto Tenk

unread,
Aug 4, 2024, 12:10:54 PM8/4/24
to pinkmekalhu
Live Server - Makes your existing server live - this is a Web Extension that helps you to live reload feature for dynamic content (PHP, Node.js, ASPNET -- Whatever, it doesn't matter).This extension is for Live Server (VSCode Extension - required v3.0.0+).You have to install Live Server extension for vscode in order to use this Add On.Follow this link to setup : -server-web-extension#setupDemo : -server-web-extension/master/img/screenshots/live-server-web-extension.gif
You don't need to install any browser plugins or manually add code snippets to your pages for the reload functionality to work, see "How it works" section below for more information. If you don't want/need the live reload, you should probably use something even simpler, like the following Python-based one-liner:
This will automatically launch the default browser. When you make a change to any file, the browser will reload the page - unless it was a CSS file in which case the changes are applied without a reload.
In order to enable HTTPS support, you'll need to create a configuration module.The module must export an object that will be used to configure a HTTPS server.The keys are the same as the keys in options for tls.createServer.
To get HTTP/2 support one can provide a custom HTTPS module via --https-module CLI parameter (httpsModule option for Node.js script). Be sure to install the module first.HTTP/2 unencrypted mode is not supported by browsers, thus not supported by live-server. See this question and can I use page on HTTP/2 for more details.
The server is a simple node app that serves the working directory and its subdirectories. It also watches the files for changes and when that happens, it sends a message through a web socket connection to the browser instructing it to reload. In order for the client side to support this, the server injects a small piece of JavaScript code to each requested html file. This script establishes the web socket connection and listens to the reload requests. CSS files can be refreshed without a full page reload by finding the referenced stylesheets from the DOM and tricking the browser to fetch and parse them again.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
I'm a frontend web developer and I use VS Code while I work and on my YouTube channel. I've had many people ask me how the browser gets refreshed automatically while I'm coding, without clicking the reload button.
Well, this is possible if you configure a useful extension in VS Code called live-server. In this post, I will explain the details of how it works and how to set up and configure a live server in your VS Code editor.
Hello,
Last month, I had installed Live-Server 1.2.0 from Cmder and it had been using :8080 to render JS output (I'm taking a JS class online). I installed Jira Core and Jira last week and now when I attempt to run a live-server command from Cmder, I get an error: 'Error: listen EACCESS 0.0.0.0:8080.' When I open my Chrome or Firefox browsers and type :8080, I am taken to the Jira Core logon page. Is there a way to change the configuration after the fact? Will Jira installations always take this address?
Yes, the default port can be changed after the install, either by using the Jira Configuration Tool or by editing the server.xml. Take a look at Changing Jira application TCP ports for more information.
3a8082e126
Reply all
Reply to author
Forward
0 new messages