Develop a set of services implementing your business process using TypeScript or JavaScript
This is an overview of possible ways to create and deploy a business service - how to put your JavaScript code into a hosting service on the SupercondActor Business Platform.
The easiest (primitive) way to create and register your business service is to use Service Manager UI. All you need to do is to type or paste your JavaScript code into a form field.
Of course, for any serious processing you would need more than several lines of code. You would need to load third party libraries, create multiple code files, etc. So, for a real-world process you would deploy your code using Code Package - a set of folders and files packed in a zip file.
Whether you are developing a single business service or a complex application containing multiple services of different types, the best way of deploying your code to the SupercondActor Business Platform is to use Code Package - a set of folders and files packed in a zip file.
If you want to create a Code Package manually, you need to know several simple rules and pre-defined folder names.
The name of the package zip file can be anything, but inside there can be five folders (each folder is optional, but if present those folders must have exactly these names):
ApiServices
, LongRunningServices
, and ListeningServices
folders contain configuration and job script files describing your business services.
Scripts
folder contains common JavaScript libraries for all services in the current application.
Files
folder can contain any additional files you want to be deployed and accessible by the services in the application.
BusinessScriptBundle.zip
|
├── ApiServices
| ├── myService1.config.json
| ├── myService1.job.js
| |
| └── myService2.config.json
|
├── LongRunningServices
| ├── myService3.config.json
| └── myService3.job.js
|
├── ScheduledServices
| ├── myService4.config.json
| └── myService4.job.js
|
├── Scripts
| ├── bundle.js
| └── another.js
|
└── Files
├── index.html
└── styles.css
npm run build
command to create zipped Code Package file ready to be deployedSee other quick start examples in our GitHub repository