Update index.js
Browse files231 unmodified lines23223323423523623723825 unmodified lines264265266267268269270231 unmodified lines.set('json spaces', 4).use(morgan('dev')).use(express.json()).all('/', (_, res) => res.send('Hello World')).get('/yt', async (req, res) => {const host = 'https://' + req.get('host');try {25 unmodified linesres.json({ message: e });}}).get('/search', async (req, res) => {try {let q = req.query.q || req.query.query;if (!q) return res.json({ message: 'Input parameter q' });231 unmodified lines23223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027125 unmodified lines297298299300301302303231 unmodified lines.set('json spaces', 4).use(morgan('dev')).use(express.json()).all('/', (_, res) => res.json({"apiList": [{"title": "Tiktok Downloader","endpoint": "/tt","method": "GET","example": `${host}/tt?url=`,},{"title": "Facebook Downloader","endpoint": "/fb","method": "GET","example": `${host}/fb?url=`,},{"title": "Instagram Downloader","endpoint": "/ig","method": "GET","example": `${host}/ig?url=`,},{"title": "Youtube Downloader","endpoint": "/ytdl","method": "GET","example": `${host}/ytdl?url=`,},{"title": "Youtube Search","endpoint": "/ytsearch","method": "GET","example": `${host}/ytsearch?url=`,}]})).get('/yt', async (req, res) => {const host = 'https://' + req.get('host');try {25 unmodified linesres.json({ message: e });}}).get('/ytsearch', async (req, res) => {try {let q = req.query.q || req.query.query;if (!q) return res.json({ message: 'Input parameter q' });
index.js+35-2