Skip to content

itstechgaurav/sync-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


# Sync PHP

this is a webpack plugin that you can use to reload php files on changes.

Installation

step 1

add plugin to the webapck.dev.config.js array


const syncPhp = require('sync-php');

plugins: [
    new syncPhp({
        port: 1337, // required
        watch: path.resolve('build/') // required
    })
]

there are two options

port

  • use the port seprate from all the other ports

watch

  • directory you want to wath changes


step 2

add loader to your main.js file at the end

require('sync-php/client.js')(1337) 
// this is the same port mentioned above

both ports should be same


step 3

run wepack server in watch mode or run dev server open your php file into browser


for php server use following command

php -S localhost:9000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published