Skip to content

Latest commit

 

History

History
66 lines (38 loc) · 1.63 KB

README.md

File metadata and controls

66 lines (38 loc) · 1.63 KB

Livereload Package

Livereload package for php.

How to install

Run this command in terminal from root folder your project:

composer require sbkinfo/livereload

Run this command in terminal from root folder your project:

wget https://raw.githubusercontent.com/silverreve23/livereload/master/livestart

Initialization Live

Insert next code in your project main file.

use LiveReloadPHP\LiveReload;

LiveReload::initReload();

How to run server

Execute next command in terminal from root folder your project:

livestart

Configuration

Default path watcher / (root project). Example config:

$config = array(
	'host' => 'localhost',
	'port' => '9060',
	'sleep' => '1', #seconds
	'folders' => array(
		'/test',
		'/recursive',
	)
);

Pass config to methods:

  • LiveReload::initReload($config) # in main file
  • Server::runServer($config) # in livestart file