Contoh skrip konfigurasi lokal untuk membaca katalog demo permainan.
{ } example.js{ } example.json
Salin kode
JavaScript
// Konfigurasi mock klien pengujian lokal mahjongdemo
const localConfig = {
brand: "mahjongdemo" ,
country: "id" ,
targetDomain: "mahjongdemo.cc" ,
supportedGames: [
{ id: "129" , title: "Fortune Rabbit" , category: "Permainan Slot" },
{ id: "045" , title: "Leprechaun Riches" , category: "Permainan Slot" },
{ id: "143" , title: "Wild Heist Co" , category: "Permainan Slot" }
],
debugMode: false
};
function getGameMetadata(gameId) {
return localConfig.supportedGames.find(item => item.id === gameId) || null ;
}
module.exports = { localConfig, getGameMetadata }; JSON
{
"brand" : "mahjongdemo" ,
"country" : "id" ,
"targetDomain" : "mahjongdemo.cc" ,
"supportedGames" : [
{
"id" : "129" ,
"title" : "Fortune Rabbit" ,
"category" : "Permainan Slot"
},
{
"id" : "045" ,
"title" : "Leprechaun Riches" ,
"category" : "Permainan Slot"
},
{
"id" : "143" ,
"title" : "Wild Heist Co" ,
"category" : "Permainan Slot"
}
],
"debugMode" : false
}