This is basic template that help you to build Custom widget for KaaIoT platform. This example next features:
- Built with Webpack
- React.js as the primary UI library
- @kaaiot/services to communicate with KaaIoT rest API
Feel free to change any files and add new packages you want.
- 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-webpack.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