- Go to releases page and download the latest version
- Run the executable that you have downloaded by double-clicking in it
- Visit the http://localhost:8080 page
requirements: Nodejs
After downloading this project source, run the following commands:
npm install --prod
npm start
And visit http://localhost:8080
Add a /etc/hosts
entry like the following:
127.0.0.2 ytd.com
Then you add an iptables rule to redirect the traffic incoming into 127.0.0.2:8080
to 127.0.0.1:80
:
iptables -t nat -A OUTPUT -d 127.0.0.2 -p tcp --dport 80 -j REDIRECT --to-port 8080
Now you can access the app in your browser through http://ytd.com or
in your network through http://<your IP>:8080
address
or, using Docker
# After downloading this project source
docker build --tag yt-downloader:latest --build-arg CREATED_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" --build-arg SOURCE_COMMIT="$(git rev-parse --short HEAD)" .
docker run --detach \
--restart=always \
--name "yt" \
--memory 4G --memory-reservation=256m \
--publish '0.0.0.0:4444:8080' \
yt-downloader
And visit http://localhost:4444
Run:
npm install
export PORT=4444
npm run dev
And go to http://localhost:4444
Every change in *.js
files will reload the server.
Doing a pure-Docker development
export PORT=8080
npm run c:build
npm run up
npm run logs
## Open the entry file `app.js` in your favorite text editor.
## Changes will reload the server that is running inside Docker container.
# In another shell session:
export PORT=8080
## to install dependencies in the up running container
npm run c:npm install <dependency name ...>
## to remove dependencies
npm run c:npm uninstall <dependency name ...>
We'll use pkg tool to generate the executable files.