Skip to content

a wrapper for yt-dlp with php and react ( challenge : using php in a react project, BE-FE mixing | چالش : استفاده از پی اچ پی به عنوان بک اند در پروژه های ری اکت)

Notifications You must be signed in to change notification settings

farhang-sa/php-youtube-dl

Repository files navigation

php-youtube-dl

A wrapper for @yt-dlp with PHP and React

challenge : php and react ( with webpack ) in dev

This was a good practice for integrating php into react project! App itself is easy as it gets! but mixing was good.

How it works ( for dev ) :

nodemon.js is the answer. npm start launches the nodemon.js and it will execute an empty fake-server-script.js. ( as we need php server not js server ) after that , it starts a php-built-in-server [php -S 0.0.0.0:8080 -t ./dist] for serving files. so nodemon watches the files for changes ( to run webpack ) and php servs them.

How to use :

  1. git clone to your server
  2. do not npm start! ( it's just for dev )

  3. delete dev files and keep the product :
    • if server is windows : npm run windows
    • if server is linux : npm run linux
  4. or just use releases :)

About

a wrapper for yt-dlp with php and react ( challenge : using php in a react project, BE-FE mixing | چالش : استفاده از پی اچ پی به عنوان بک اند در پروژه های ری اکت)

Topics

Resources

Stars

Watchers

Forks