Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

UCP Version

node v14.20.1
version: 2.2.0
endpointsharetweet
const result = await require('got')('https://ucp.fandom.com/api/v1/Mercury/MobileWikiVariables').json(); const version = result.data.wgPerformanceMonitoringSoftwareVersion.split('@')[0].replace('release-', ''); exports.endpoint = (req, res) => { if (req.url === '/json') { res.setHeader('Content-Type', 'aplication/json'); res.end(`{"version": "${version}"}`); } else { res.setHeader('Content-Type', 'text/plain'); res.end(version); } }
Loading…

no comments

    sign in to comment