mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 12:00:01 +03:00
Added a new read me (DEVELOPMENT.md) as starting point for new develope
Added a new VSC launch configuration to start the backend in the debugger Update the build instruction in README.md (Issue #728)
This commit is contained in:
14
.vscode/launch.json
vendored
14
.vscode/launch.json
vendored
@@ -4,6 +4,20 @@
|
|||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Dev: Debug Backend",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run-script",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
],
|
||||||
|
"type": "node",
|
||||||
|
"cwd": "${workspaceFolder}/backend"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
|
|||||||
38
DEVELOPMENT.md
Normal file
38
DEVELOPMENT.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<h1>Development</h1>
|
||||||
|
|
||||||
|
- [First time...](#first-time)
|
||||||
|
- [Setup](#setup)
|
||||||
|
- [Startup](#startup)
|
||||||
|
- [Debugging the backend (VSC)](#debugging-the-backend-vsc)
|
||||||
|
- [Deploy changes](#deploy-changes)
|
||||||
|
- [Frontend](#frontend)
|
||||||
|
- [Backend](#backend)
|
||||||
|
|
||||||
|
# First time...
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
Checkout the repository and navigate to the `youtubedl-material` directory.
|
||||||
|
```bash
|
||||||
|
vim ./backend/appdata/default.json # Edit settings for your local environment
|
||||||
|
npm -g install pm2 # Install pm2
|
||||||
|
npm install # Install dependencies for the frontend
|
||||||
|
cd ./backend
|
||||||
|
npm install # Install dependencies for the backend
|
||||||
|
cd ..
|
||||||
|
npm run build # Build the frontend
|
||||||
|
```
|
||||||
|
This step have to be done only once.
|
||||||
|
|
||||||
|
## Startup
|
||||||
|
Navigate to the `youtubedl-material/backend` directory and run `npm start`.
|
||||||
|
|
||||||
|
# Debugging the backend (VSC)
|
||||||
|
Open the `youtubedl-material` directory in Visual Studio Code and run the launch configuration `Dev: Debug Backend`.
|
||||||
|
|
||||||
|
# Deploy changes
|
||||||
|
|
||||||
|
## Frontend
|
||||||
|
Navigate to the `youtubedl-material` directory and run `npm run build`. Restart the backend.
|
||||||
|
|
||||||
|
## Backend
|
||||||
|
Simply restart the backend.
|
||||||
@@ -70,7 +70,9 @@ If you'd like to install YoutubeDL-Material, go to the Installation section. If
|
|||||||
|
|
||||||
To deploy, simply clone the repository, and go into the `youtubedl-material` directory. Type `npm install` and all the dependencies will install. Then type `cd backend` and again type `npm install` to install the dependencies for the backend.
|
To deploy, simply clone the repository, and go into the `youtubedl-material` directory. Type `npm install` and all the dependencies will install. Then type `cd backend` and again type `npm install` to install the dependencies for the backend.
|
||||||
|
|
||||||
Once you do that, you're almost up and running. All you need to do is edit the configuration in `youtubedl-material/appdata`, go back into the `youtubedl-material` directory, and type `npm build`. This will build the app, and put the output files in the `youtubedl-material/backend/public` folder.
|
Once you do that, you're almost up and running. All you need to do is edit the configuration in `youtubedl-material/appdata`, go back into the `youtubedl-material` directory, and type `npm run build`. This will build the app, and put the output files in the `youtubedl-material/backend/public` folder.
|
||||||
|
|
||||||
|
Lastly, type `npm -g install pm2` to install pm2 globally.
|
||||||
|
|
||||||
The frontend is now complete. The backend is much easier. Just go into the `backend` folder, and type `npm start`.
|
The frontend is now complete. The backend is much easier. Just go into the `backend` folder, and type `npm start`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user