A simple youtube downloader included in Tsunami
To install Mist on your site you need to be using nodejs and express
1: Upload the mist folder to your website
2: Setup express
constexpress=require('express');constapp=express();3: Add mist
constmist=require("mist-yt");4: Setup mist
app.use((req,res)=>{if(req.url.startsWith("/watch")){mist.watch(req,res)}elseif(req.url.startsWith("/video")){mist.video(req,res)}})If you want some kind of error page you can set it up like this
app.use((req,res)=>{if(req.url.startsWith("/watch")){mist.watch(req,res)}elseif(req.url.startsWith("/video")){mist.video(req,res)}else{res.send("404 Error)
}})Full Result (see /demo)
constexpress=require('express');constapp=express();constmist=require("mist-yt");app.use((req,res)=>{if(req.url.startsWith("/watch")){mist.watch(req,res)}elseif(req.url.startsWith("/video")){mist.video(req,res)}})app.listen(8080,()=>{console.log('Server running at localhost:8080');});Your all setup! Access Mist by going to /watch
/watch?=videoid&audio=false Main video page
/video?=videoid&audio=false Just the video
If you wish to use Mist commercially (on your service) you must include credit to Mist somewhere on your service