We have prepared a sample Node.js server that implements the Flexmonster custom data source API. It is available at the
server-nodejs/ folder on the api-data-source GitHub repository.
All requests from Flexmonster Pivot Table are handled by
http://localhost:3400/api/cube endpoints. Raw data is stored in JSON format in the
server-nodejs/data folder. The file name matches the
index property of the
dataSource configuration object.
.zip archive with the sample project or clone it from GitHub with the following command:
git clone https://github.com/flexmonster/api-data-source my-proj
To start the server, run the following commands in a console:
On the client side (see
/client/index.html), the report is configured as follows:
You may be interested in the following articles: