This package can help you to interact with Cfx.re.
npm i @niclqs/cfx-data-fetcher
const cfx = require('@niclqs/cfx-data-fetcher');
(async () => {
const server = await cfx.fetchServerData('xxxxxx');
const status = await cfx.fetchCfxStatus();
})();
It is always important to check the status and server of any service or application you are using. This can prevent errors and failures from occurring, and ensure that you are getting the most out of the service.
Try-Catch is your friend! (Written by ChatGPT)
server.getEndpoint()
server.getGametype()
server.getHostname()
server.getMapname()
server.getMapname()
server.getPlayerCount()
server.getMaxSlots()
server.getResources()
server.getServerVersion()
server.getVars()
server.getOnlinePlayers()
server.getServerOwnerId()
server.getServerOwnerName()
server.isServerPrivate()
server.getUpvotes()
server.getBurstUpvotes()
server.getServerPatreonBadge()
server.getJson()
status.isOnline()
status.getPageJson()
status.getStatusJson()