An easiest way to use php in electron.
- For now its only supports MAC. And windows and Linux will be supported if php will be installed. I invite openly everyone to contribute in this project and make it working in window and linux also.
Clone and run for a quick way to see Electron4PHP in action.
git clone https://github.com/johnhart96/ELECTRON-4-PHP/
cd ELECTRON-4-PHP
npm install
npm start
Use this app along with the Electron API Demos app for API code examples to help you get started.
A basic Electron4PHP application needs just these files:
package.json
- Points to the app's main file and lists its details and dependencies.main.js
- Starts the app and creates a browser window to render HTML. This is the app's main process.index.php
- A web page to render. This is the app's renderer process.
macOS has removed the default PHP instance from 12.0 onwards. Please see this link to re-install it https://github.com/shivammathur/homebrew-php
To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
git clone https://github.com/johnhart96/ELECTRON-4-PHP
# Go into the repository
cd ELECTRON-4-PHP
# Install dependencies
npm install
# Run the app
npm start