Live-server Github

0 views
Skip to first unread message

Karlyn Hemmerling

unread,
Aug 5, 2024, 4:54:13 AM8/5/24
to dihorgabers
Youwould need to set up two remotes in your git configuration, one for github (this is probably your "origin" right now), and one for your other server. Push to github as usual, and then push to your other server with git push yourserver.

If I understand you correctly, you want the pushed changes to be published somewhere (whether or not this is a good idea I will not debate) - and this can be accomplished by adding a "hook" script which is run after each push has been made to the git repository on the server. The hook could for instance copy some files to your www/ directory.


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.


GitHub Pages now uses GitHub Actions to execute the Jekyll build. When using a branch as the source of your build, GitHub Actions must be enabled in your repository if you want to use the built-in Jekyll workflow. Alternatively, if GitHub Actions is unavailable or disabled, adding a .nojekyll file to the root of your source branch will bypass the Jekyll build process and deploy the content directly. For more information on enabling GitHub Actions, see "Managing GitHub Actions settings for a repository."


Tip: If you see a Ruby error when you try to install Jekyll using Bundler, you may need to use a package manager, such as RVM or Homebrew, to manage your Ruby installation. For more information, see "Troubleshooting" in the Jekyll documentation.


Note: If you've installed Ruby 3.0 or later (which you may have if you installed the default version via Homebrew), you might get an error at this step. That's because these versions of Ruby no longer come with webrick installed.


Jekyll is an active open source project that is updated frequently. If the github-pages gem on your computer is out of date with the github-pages gem on the GitHub Pages server, your site may look different when built locally than when published on GitHub. To avoid this, regularly update the github-pages gem on your computer.


Hello,

I have setup ERPNext on AWS Hosting, Now i want to update my localhost erpnext custom application to live server.

i have installed a fresh erpnext setup in server.

Please tell me how to do it?


Hello,

I have not done any changes in core file.

I have only changed the desk forms and uploaded the new product and created some flow.

That changes , i want to upload in live server. please tell me how to do that.


@Sangram @saidsl

If the custom app has been created at ERPNext server and I have new server with new ERPNext version, and I need to deploy my custom app at the new server of the new ERPNext version, then I can use the same method? Or the new server should has the same ERPNext version?


The install is pretty straight forward really, once it install all the requirements it installs Frappe & ERPNext apps. Which is why I mentioned, ideally, you have your custom app in github repo that can be installed after you have installed everything.


How to handle wordpress core and plugin updates when using git?I need to update my core and plugins. I have site on my localhost and live site on server.If I update localy and then commit+push changes it breaks site because the live database is not updated.If I update live site I have no changes on localhost, and no way to test if update breaks site.


In my readings (and as mentioned in OP comments) the best practice seemed to be focusing on the /wp-content/ folder, or specific custom contents therein. Syncing all the core files and third party plugins just causes headaches and unnecessary version monitoring.


I had troubles with this myself, but it's best to remove the mentality that repo act as a mirrored / complete backup, because (from reading & my own experience, as well as your post shows), it doesn't work well that way.


This old post stevegrunwell.github.io/wordpress-git/ is a good resource for defining the line between what to include and exclude for the local/git/live workflow. Most notably, slide 13 shares and awesome .htaccess rewrite to use remote media files so you're not always keeping local in sync.


These guides provide instructions for performing a static deployment of your Vite site. Vite also supports Server Side Rendering. SSR refers to front-end frameworks that support running the same application in Node.js, pre-rendering it to HTML, and finally hydrating it on the client. Check out the SSR Guide to learn about this feature. On the other hand, if you are looking for integration with traditional server-side frameworks, check out the Backend Integration guide instead.


Go to your GitHub Pages configuration in the repository settings page and choose the source of deployment as "GitHub Actions", this will lead you to create a workflow that builds and deploys your project, a sample workflow that installs dependencies and builds using npm is provided:


Install the extension in VS Code and navigate to your app root. Open the Static Web Apps extension, sign in to Azure, and click the '+' sign to create a new Static Web App. You will be prompted to designate which subscription key to use.


Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually /) and built file location /dist. The wizard will run and will create a GitHub action in your repo in a .github folder.


The action will work to deploy your app (watch its progress in your repo's Actions tab) and, when successfully completed, you can view your app in the address provided in the extension's progress window by clicking the 'Browse Website' button that appears when the GitHub action has run.

3a8082e126
Reply all
Reply to author
Forward
0 new messages