My First Playground

node v16.18.0
version: 16.0.0
endpointsharetweet
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
var request = require("request") var abbreviate = require('number-abbreviate') exports.endpoint = function(_, response) { request("https://games.roblox.com/v1/games?universeIds=3078468986", function(error, _, body) { var data = { "visits": abbreviate(JSON.parse(body).data[0].visits).toUpperCase(), } response.setHeader("Content-Type", "application/json") response.end(JSON.stringify(data)) }) }
Loading…

no comments

    sign in to comment