This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| app-notes:cumulocity-app [2017/01/17 15:54] – shasha | app-notes:cumulocity-app [2017/02/10 14:27] (current) – [Installing Cumulocity UI plugins] krepel | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Comulocity | + | ===== Build Comulocity |
| + | |||
| + | ==== Prerequisites | ||
| * You will need Node.js (6.7 or newer) | * You will need Node.js (6.7 or newer) | ||
| * You will need npm (installed with Node.js) | * You will need npm (installed with Node.js) | ||
| * You will need access to your Cumulocity account, i.e. you need your tenant name, username and password. | * You will need access to your Cumulocity account, i.e. you need your tenant name, username and password. | ||
| ==== Install Node.js and npm ==== | ==== Install Node.js and npm ==== | ||
| + | First download node.js: https:// | ||
| + | |||
| + | Then go to the download folder and unpack node.js. | ||
| + | <code bash> | ||
| + | tar –xzvf node-v7.3.0-linux-x64.tar.gz | ||
| + | </ | ||
| + | Now we have to create a new folder for node.js. | ||
| + | <code bash> | ||
| + | mkdir / | ||
| + | </ | ||
| + | Then we move all to the new folder. | ||
| + | <code bash> | ||
| + | mv node-v7.3.0-linux-x64/ | ||
| + | </ | ||
| + | At last we go to the root folder with **cd** and add the path of node.js. | ||
| + | <code bash> | ||
| + | export PATH=$PATH:/ | ||
| + | </ | ||
| + | With echo $PATH we can see the paths. | ||
| + | ==== Command line interface ==== | ||
| + | Now we go to the / | ||
| + | <code bash> | ||
| + | npm i cumulocity-tools –g | ||
| + | </ | ||
| + | After this we can check the installation and we see the command what we can use to build our Cumulocity apps. | ||
| + | <code bash> | ||
| + | c8y --help | ||
| + | </ | ||
| + | ==== Installing Cumulocity UI plugins ==== | ||
| + | Now the can create a folder for your Cumulocity app. In this folder we need a package.json file. This file we can create with: | ||
| + | <code bash> | ||
| + | npm init | ||
| + | </ | ||
| + | We need for our app the Cumulocity UI plugins. So we install in this folder all the Cumulocity plugins. | ||
| + | <code bash> | ||
| + | c8y install latest | ||
| + | </ | ||
| + | If you want, to see in detail how you can create your app then klick on this link: https:// | ||
| + | |||
| + | To build the app go to the root folder of your app: | ||
| + | <code bash> | ||
| + | c8y build:app < | ||
| + | </ | ||
| + | The app is stored in **/build** folder of your app. | ||
| + | If you are finished with your app, then you can build your app and upload to Cumulocity. | ||
| + | ==== Upload the application to Cumulocity ==== | ||
| + | Navigate to the Administation and klick to menu Own applications. | ||
| + | {{ : | ||
| + | Then we have to klick to Add application. | ||
| + | {{ : | ||
| + | Then we get this window. In our case we want to upload the ZIP file. For this we klick at Upload ZIP file. | ||
| + | {{ : | ||
| + | Now we can drop our ZIP file in this square or klick at “Upload archive” to upload the file. | ||
| + | {{ : | ||
| + | Take your application and klick “Open” and the file will be uploaded. | ||
| + | {{ : | ||