Skip to content

Commit ff595fb

Browse files
committed
docs: Add minimal examples of cube.py and cube.js configuration files
1 parent 04b66b1 commit ff595fb

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

docs/pages/product/configuration.mdx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,33 @@ module.exports = {
8787
member: 'orders_view.id',
8888
operator: 'equals',
8989
values: [securityContext.order_id]
90-
});
90+
})
9191
}
92-
return query;
93-
},
94-
};
92+
return query
93+
}
94+
}
9595
```
9696

9797
</CodeTabs>
9898

9999
Both ways are equivalent; when in doubt, use Python.
100100

101+
Here is a minimal correct `cube.py` file. Note that the `config` object must be imported:
102+
103+
```python
104+
from cube import config
105+
106+
# Configuration goes here...
107+
```
108+
109+
Here is a minimal correct `cube.js` file. Note that the `module.exports` object must be defined:
110+
111+
```javascript
112+
module.exports = {
113+
// Configuration goes here...
114+
}
115+
```
116+
101117
You can read more about [Python][ref-python] and [JavaScript][ref-javascript] support
102118
in the dynamic data modeling section of the documentation.
103119

0 commit comments

Comments
 (0)