Sampel kode konfigurasi JavaScript dan format JSON untuk manajemen status aplikasi secara lokal.
JavaScript
// Konfigurasi lingkungan klien lokal untuk ink666
const ink666LocalConfig = {
platformName: "ink666",
targetLocale: "id-ID",
debugMode: false,
gameCatalog: [
{ id: "169", title: "Fortune Snake", type: "slot" },
{ id: "019", title: "Dragon Legend", type: "slot" },
{ id: "162", title: "Three Cz Pigs", type: "slot" },
{ id: "053", title: "Fortune Mouse", type: "slot" },
{ id: "193", title: "Reel Royale Sd", type: "slot" }
],
sessionPreferences: {
autoReconnect: true,
maxRetryCount: 3,
cacheDurationSec: 3600
}
};
function getGameMetadata(gameId) {
return ink666LocalConfig.gameCatalog.find(item => item.id === gameId) || null;
}
module.exports = { ink666LocalConfig, getGameMetadata };
JSON
{
"platformName": "ink666",
"targetLocale": "id-ID",
"debugMode": false,
"gameCatalog": [
{ "id": "169", "title": "Fortune Snake", "type": "slot" },
{ "id": "019", "title": "Dragon Legend", "type": "slot" },
{ "id": "162", "title": "Three Cz Pigs", "type": "slot" },
{ "id": "053", "title": "Fortune Mouse", "type": "slot" },
{ "id": "193", "title": "Reel Royale Sd", "type": "slot" }
],
"sessionPreferences": {
"autoReconnect": true,
"maxRetryCount": 3,
"cacheDurationSec": 3600
}
}