欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

如何在 cube.js 中启用多租户模式:一份详细指南

最编程 2024-01-16 21:36:07
...
module.exports = {
  contextToAppId: ({ authInfo }) => `CUBEJS_APP_${authInfo.myappid}`,
  // scheduledRefreshContexts should return array of objects, which can declare authInfo
  scheduledRefreshContexts: async () => [
    {
      authInfo: {
        myappid: "demoappid",
        u: {
          bucket: "demo"
        }
      }
    },
    {
      authInfo: {
        myappid: "demoappid2",
        u: {
          bucket: "demo2"
        }
      }
    }
  ]
};