Atom Live Server



Forked from jas-chen/atom-live-server.

Launch a simple development http server with live reload capability.

This package is based on awesome Live Server project.

I found an 'atom-live-server' Atom plug-in to allow for simple set-up of a live server with the project's files instantly accessible from a browser / runtime It was recommended by a Javascript web-game coding page. Does the plugin look suspicious/ not as good as apache? It means I can easily do local / LAN testing. LiveReload for Atom An Atom package enables you to control built-in LiveReload server. LiveReload monitors changes in the file system. As soon as you save a file, it is preprocessed as needed, and the browser is refreshed. May 19, 2017 I have Atom live-server installed & browser -refresh, if someone could help on two issues; I am using Windows 7 on my PC. When I make and entry to my html fileI a have to to open windows explorer /open in browser and refresh.( my browser is Google chrome. I thought that as you typed in code in your project /hit save/ it would re-load without pressing the refresh icon First step in.

Usage

CommandKeybindingDescription
atom-live-server:start-serverctrl-alt-lLaunch live server on default port, by default 3000.
atom-live-server:stop-serverctrl-alt-qStops currently running instance of live server.
atom-live-server:start-3000ctrl-alt-3Launch live server on port 3000.
atom-live-server:start-4000ctrl-alt-4Launch live server on port 4000.
atom-live-server:start-5000ctrl-alt-5Launch live server on port 5000.
atom-live-server:start-8000ctrl-alt-8Launch live server on port 8000.
atom-live-server:start-9000ctrl-alt-9Launch live server on port 9000.

Options

Javascript - How to launch atom live server step by step ...

If a file .atom-live-server.json exists in project root it will be loaded and used as options.

The keys of .atom-live-server.json should match Command line parameters in live-server.

Example: Launch specific browser

Example: Start server without browser opened

Example: Serve this file for every 404 (useful for single-page applications)

Example: Serve this directory as root path

Introduction

Atom is a popular open-source text editor with color styling, code autocompletion, and other functionality. It comes with support for many programming languages including C, C++, C#, CSS, HTML, Java, and many, many others. Atom has been extended by its community of users through packages that add new features.

Installing Atom

Visiting atom.io will try to guess the operating system of the device and prove an appropriate download link. Other versions and supported platforms can also be found on its latest releases page on GitHub.

Once installed, Atom can then be used to write in many different programming languages.

Installing PHP

Unix-based systems like Linux and MacOS X come with PHP installed. For Windows, PHP needs to be downloaded.

Configuring PHP on Windows

Atom Live Server

Once downloaded, the PHP files should be copied into folder, “C:php”, that will serve as the root directory for using PHP.

Re-naming the php.ini-development file

In order to run, PHP needs to know what settings to use. The php.ini file lists all of these settings. For development purposes, the php.ini-development file should be renamed php.ini, as it comes with pre-configured settings for a development environment.

Adding PHP to the Windows PATH

In order to use PHP in Windows, it has to be added to the PATH global variable.

FullLive

For the Start Search, begin to type “env” and then click on “Edit the system environment variables”

On the System Settings windows, click on “Environment Variables…” button in the lower, right-hand corner.

In the lower System variables panel, find “Path” in the listing. Select it and then click the “Edit” button.

Click “New” on the right-hand side. Add “C:php” (or the folder used for PHP in the earlier step).

Click “OK” to save the new entry and close the “Edit environment variable” and then “System Settings” windows.

Adding php-server to Atom

Open Atom.

Go to Atom -> Preferences or Atom -> Settings (Depending on the operating system, the wording might be different).

From the left-hand options, click on “+Install”

In the search bar, type in “php-server” and click its “Install” button once the php-server package has been found.

Using the PHP Server in Atom

Once PHP has been installed, configured, and can be accessed via the PATH variable by the operating system, it can be invoked by the Atom package.

Atom Live Server Not Working

For a PHP project or file, click on Packages -> PHP Server and then choose either to start the server in the project root, selected folder tree, or for the current file.

Javascript - How To Launch Atom Live Server Step By Step ...

Once started, PHP Server will open a web browser for the current option (folder or file).

Atom Live Server For Visual Studio Code

Any errors will be reported in the Atom log area. The current port and document (project) root will be also be listed.