Mã nguồn minh họa định dạng cấu hình dữ liệu trò chơi nội bộ.
JavaScript
// Cau hinh tham chieu cuc bo danh cho ung dung JW88
const appConfig = {
brand: "JW88",
platform: "android",
defaultLocale: "vi-VN",
featuredGames: [
{ id: "098", name: "Mermaid Riches", category: "Slot" },
{ id: "178", name: "Galaxy Miner", category: "Slot" },
{ id: "001", name: "Diaochan", category: "Slot" }
],
logLevel: "info"
};
function getFeaturedGameList() {
return appConfig.featuredGames.map(game => game.name);
}
module.exports = { appConfig, getFeaturedGameList };
JSON
{
"brand": "JW88",
"platform": "android",
"defaultLocale": "vi-VN",
"featuredGames": [
{
"id": "098",
"name": "Mermaid Riches",
"category": "Slot"
},
{
"id": "178",
"name": "Galaxy Miner",
"category": "Slot"
},
{
"id": "001",
"name": "Diaochan",
"category": "Slot"
}
],
"logLevel": "info"
}