{"id":13403279,"url":"https://github.com/aj-techsoul/ELECTRON-4-PHP","last_synced_at":"2025-03-14T08:31:38.209Z","repository":{"id":29522591,"uuid":"120654881","full_name":"aj-techsoul/ELECTRON-4-PHP","owner":"aj-techsoul","description":"An easiest way to use php in electron","archived":false,"fork":false,"pushed_at":"2022-12-13T18:35:58.000Z","size":14417,"stargazers_count":199,"open_issues_count":17,"forks_count":45,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-07-31T19:39:54.800Z","etag":null,"topics":["electron","for","javascript","php"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aj-techsoul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"techsoulin","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://techsoul.in"}},"created_at":"2018-02-07T18:33:34.000Z","updated_at":"2024-07-20T10:23:44.000Z","dependencies_parsed_at":"2023-01-14T15:15:21.424Z","dependency_job_id":null,"html_url":"https://github.com/aj-techsoul/ELECTRON-4-PHP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aj-techsoul%2FELECTRON-4-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aj-techsoul%2FELECTRON-4-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aj-techsoul%2FELECTRON-4-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aj-techsoul%2FELECTRON-4-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aj-techsoul","download_url":"https://codeload.github.com/aj-techsoul/ELECTRON-4-PHP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243547381,"owners_count":20308697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","for","javascript","php"],"created_at":"2024-07-30T19:01:27.742Z","updated_at":"2025-03-14T08:31:35.705Z","avatar_url":"https://github.com/aj-techsoul.png","language":"JavaScript","funding_links":["https://patreon.com/techsoulin","https://techsoul.in"],"categories":["JavaScript"],"sub_categories":[],"readme":"![alt text](https://github.com/AJ-TechSoul/ELECTRON-4-PHP/blob/master/electron4php.jpg?raw=true)\n# ELECTRON-4-PHP\nAn easiest way to use php in electron.\n- *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.*\n\n**Clone and run for a quick way to see Electron4PHP in action.**\n```\ngit clone https://github.com/AJ-TechSoul/ELECTRON-4-PHP/\ncd ELECTRON-4-PHP\nnpm install\nnpm start\n```\n\n**Use this app along with the [Electron API Demos](http://electron.atom.io/#get-started) app for API code examples to help you get started.**\n\nA basic Electron4PHP application needs just these files:\n\n- `package.json` - Points to the app's main file and lists its details and dependencies.\n- `main.js` - Starts the app and creates a browser window to render HTML. This is the app's **main process**.\n- `index.php` - A web page to render. This is the app's **renderer process**.\n\n\n## To Use\n\nTo clone and run this repository you'll need [Git](https://git-scm.com) and [Node.js](https://nodejs.org/en/download/) (which comes with [npm](http://npmjs.com)) installed on your computer. From your command line:\n\n```bash\n# Clone this repository\ngit clone https://github.com/AJ-TechSoul/ELECTRON-4-PHP\n# Go into the repository\ncd ELECTRON-4-PHP\n# Install dependencies\nnpm install\n# Run the app\nnpm start\n```\n\nNote: If you're using Linux Bash for Windows, [see this guide](https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/) or use `node` from the command prompt.\n\n\n## Configuration\nYou 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 /////\n\n## Configuration\n\nName | Default | Description\n-----|---------|------------\n`php` | `php` | The php command file\n`host` | `127.0.0.1` | The server's host\n`port` | `8000` | The port used\n`directory` | `null` | The document root. By default is the current working directory\n`script` | `null` | The \"router\" script\n`stdio` | `inherit` | stdio option passed to the spawned process - https://nodejs.org/api/child_process.html#child_process_options_stdio\n`directives` | `{}` | An object with the custom PHP directives\n`config` | `null` | The path of a custom php.ini file\n`env` | `process.env` | The environment variables passed\n\nExample:\n\n```js\nconst PHPServer = require('php-server-manager');\n\nconst server = new PHPServer({\n    port: 3000,\n    directives: {\n        display_errors: 0,\n        expose_php: 0\n    }\n});\n\nserver.run();\n```\n\n## Use with gulp\n\n```js\ngulp.task('php-server', done =\u003e {\n    const server = new PHPServer({\n        directory: 'public',\n        script: 'public/index.php'\n    });\n\n    server.run(done);\n});\n```\n\n## LARAVEL in ELECTRON-4-PHP\nWell, here is a video on \"Laravel | PHP Desktop Application using Electron?\" made by theGimmickBox , the person makes great videos on Life H@cks, Tips \u0026 Tricks :D etc. \nPlease checkout this video on implementation on Laravel -\u003e https://www.youtube.com/watch?v=HwRAaywZXAQ\n\n\n## License\n\n[CC0 1.0 (Public Domain)](LICENSE.md)\n\n## Credits (Thank You) \n\nOSCAROTERO FOR PHP SERVER\nhttps://github.com/oscarotero/php-server-manager\n\nELECTRON\nhttps://electronjs.org/\n\n\n## VOLUNTEER\nMail me : aj@techsoul.in\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faj-techsoul%2FELECTRON-4-PHP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faj-techsoul%2FELECTRON-4-PHP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faj-techsoul%2FELECTRON-4-PHP/lists"}