Skip to content

a wrapper for yt-dlp with nodejs and react ( challenge : using webpack in both BE/FE | چالش : استفاده از وب پک در کامپیال فرانت و بک همزمان )

Notifications You must be signed in to change notification settings

farhang-sa/js-youtube-dl

Repository files navigation

js-youtube-dl

A wrapper for @yt-dlp with NodeJS and React

challenge : compiling both back-end and front-end with webpack ( like nextjs )

A practice of compiling BE/FE modules and scripts at the same time with webpack. App works like @farhang-sa/php-youtube-dl , but with nodejs in backend

How it works ( for dev ) :

for compiling both BE & FE , you need to create two webpack.config files and in server.config you need to declare 'target' : 'node' that tells webpack to compile for nodejs not browser. everything else is stright forward. ps. take look at nodemon.js

How to use :

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

  3. if you did change to code ( ip,port,etc ) run npm run build to generate bundles
  4. delete dev files and keep the product :
    • if server is windows : npm run windows
    • if server is linux : npm run linux
  5. start server.js as suggested in output of step 4
  6. no (1-4) : use releases to get final files and do step 5

About

a wrapper for yt-dlp with nodejs and react ( challenge : using webpack in both BE/FE | چالش : استفاده از وب پک در کامپیال فرانت و بک همزمان )

Topics

Resources

Stars

Watchers

Forks