This is basic template that help you to build Custom widget for KaaIoT platform. This example next features:
- Built with Rollup
- React.js as the primary UI library
- @kaaiot/services to communicate with KaaIoT rest API
- Access to KaaIoT UI. You can create a free cloud account if you don't have one.
- Node.js > 18 or nvm
- npm
Clone this repo:
git clone https://github.com/kaaproject/kaa-widget-rollup.git
If you have nvm:
nvm install
# Next time for new terminal session
nvm use
Install dependencies:
npm i
Run development mode:
npm start
Login into any running KaaIoT Web Dashboard UI and create a new widget from Custom widgets
page.
To make a production build:
npm run build
Production build compiles to dist/index.js
. You can upload this file into running KaaIoT platform using Web Dashboard UI