As a component developer, I should be able to add a serverScript property to my component package.json which will make a server available to my component.
Use case: An API that the component uses requires server-side authentication in order to be secure.
Implementation:
Modify package.json to include:
{
...
"adalo": {
"displayName": "Example Library",
"iosInstallScript": "./relativePath/to/script/here",
"androidInstallScript": "./relativePath/to/script/here",
+ "serverScript": "./relativePath/to/script/here",
}
}
Manifest.json - add “private” property so that the prop is exposed to the server, but not the component. Good for private API keys.
...
"props": [
{
"name": "privateApiKey",
"displayName": "Server API Key",
"type": "boolean",
"default": "true"
+ "private" : "true"
},
...
Result
The react component prop can expose the server URL to the Adalo component.