Contoh berkas konfigurasi lokal JavaScript dan format JSON pendamping.
JavaScript
// Konfigurasi objek lokal katalog game rr33
const clientConfig = {
brand: "rr33",
country: "id",
defaultLocale: "id-ID",
supportedGames: [
{ id: "165", title: "Rio Fantasia" },
{ id: "082", title: "Gdn Ice Fire" },
{ id: "182", title: "Pharaoh Royals" }
],
session: {
timeoutMs: 1800000,
autoRefresh: true
}
};
function getGameTitle(gameId) {
const game = clientConfig.supportedGames.find(item => item.id === gameId);
return game ? game.title : "Unknown";
}
JSON
{
"brand": "rr33",
"country": "id",
"defaultLocale": "id-ID",
"supportedGames": [
{
"id": "165",
"title": "Rio Fantasia"
},
{
"id": "082",
"title": "Gdn Ice Fire"
},
{
"id": "182",
"title": "Pharaoh Royals"
}
],
"session": {
"timeoutMs": 1800000,
"autoRefresh": true
}
}