Git Product home page Git Product logo

electron-php's Introduction

Electron-PHP Banner

electron-php

Build cross-platform (coming soon) desktop applications using PHP as backend and electron for rendering. Currently, we only support Windows, but we already work on support for mac and linux.

Build an application

First you need to make sure that you have NodeJS and NPM installed. Also make sure that you have modified your environment variables according to their needs.
Now we can clone the repository code and install the dependencies.

git clone https://github.com/padrio/electron-php/

To install the dependencies you need to run the setup script. Use either the setup.bat (windows) or setup.sh (macOS/linux)

Use this app along with the Electron API Demos app for API code examples to help you get started.

Configuration

You can pass a callback to the run method, this will get called when the PHP server is up and running. If you don't pass a callback to the run method, a promise will be returned that resolves when the PHP server is up and running. These you need to do at main.js file from where you find comment of // PHP SERVER CREATION /////

Configuration

Name Default Description
php php The php command file
host 127.0.0.1 The server's host
port 8000 The port used
directory null The document root. By default is the current working directory
script null The "router" script
stdio inherit stdio option passed to the spawned process - https://nodejs.org/api/child_process.html#child_process_options_stdio
directives {} An object with the custom PHP directives
config null The path of a custom php.ini file
env process.env The environment variables passed

Volunteer

Feel free to simply contribute.

electron-php's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

electron-php's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.