3.2.0 • Published 6 years ago
sassi-azure v3.2.0
sassi-azure
The sassi-azure
package enables two features presently:
- client side library for managing app services, slots, and urls
- server side library to get data from azure service (urls)
The former maybe of dubious value presently... But as interactions with the Azure increase, it may find more value. It also may separate into two libraries: sassi-azure and sassi-azure-server. There be dragons here.
Use of the (server side) library is relatively simple. It is intended to be called by the server, once to gather data for ServerBuildData
(defined in sassi-core
).
const { HostedAzureAppServiceSlotData } = require('sassi-azure');
const azureServiceSlot = new HostedAzureAppServiceSlotData.fromEnv(process.env);
Then assuming you have a SassiApiServer config and using sassi-express-api:
const {
SassiApiServerConfig,
ISassiApiServerConfigOptions
} = require('sassi-server-api');
const { registerSassiApi } = require('sassi-express-api');
// assumes `sassiApiConfig` is already created
sassiApiConfig.fetchServerData = () => {
return {
startTimeUtc,
fetchTimeUtc: new Date().toISOString(),
service: azureServiceSlot
};
};
const sassiApiServerConfig = new SassiApiServerConfig(sassiApiConfig);
registerSassiApi(server, sassiApiServerConfig);