foyzulkarim / mern-video-streaming

MERN Video Streaming is a cutting-edge, open-source platform for video streaming, offering a comprehensive, full-stack solution utilizing the latest MERN stack technologies.
MIT License
182 stars 63 forks source link

create folders script #24

Closed foyzulkarim closed 1 year ago

foyzulkarim commented 1 year ago

In server folder, we need to create some subfolders where the videos will be uploaded and processed.

aninda052 commented 1 year ago

@foyzulkarim vai, we already have an uploads folder inside server folder. Do we still need to create other sub-folders for uploaded and processed videos ? if yes, how do you want them ?

foyzulkarim commented 1 year ago

The thing is, the folders are manually created on a fresh machine. I was thinking to use zx to create the folders. Jist fancy ways to do stuffs. 😅

Example command: npm run init-directories

I am happy to hear more suggestions.

aninda052 commented 1 year ago

oh, i remember that i had to create uploads folder manually before running the project. Without these folders, system will break. We can create(if them are not already created) these folder/sub-folders automatically after running npm run start. This way we never have to think about those folder, neither our system will break from not creating them.

foyzulkarim commented 1 year ago

It is not a good idea to mix different things into single place. We don't need to check every time coz it is a part of setup process, similar as mongodb connection url thing. You can do it as you see fit, we can discuss or refactor later. 🙂

aninda052 commented 1 year ago

sorry for the multiple commit messages. :(

foyzulkarim commented 1 year ago

You can try using zx library. you can do conditional shell scripting using javascript by using this library.

foyzulkarim commented 1 year ago

it is done