This is a set of common services and components helping to create SoNET enabled apps.
$ npm install
$ ng build sonet-appskit --prod
$ npm install @iradek/sonet-appskit
app.module.ts
// Import your library
import { SoNetAppsKitModule } from '@iradek/sonet-appskit';
@NgModule({
(...)
imports: [
(...)
// Specify your library as an import
SoNetAppsKitModule,
],
(...)
})
export class AppModule { }
sonet.config.json
{
"api_baseUrl": "https://[SoNET base Url]",
"oauth_client_id": "[SoNET Client ID]",
"oauth_client_secret": "[SoNET Client Cecret]",
"oAuthGrant": "ResourceOwner", //or ClientCredentials for non-Site level access
"siteName": "[SoNET Site Name]",
"userName": "[Name of the User with access to above Site]",
"userPassword": "[Password of the User with access to above Site]",
"passwordAlreadyEncrypted": false,
"logging": false
}
To override the location of configuration file:
sonetapp.config.ts
import { Injectable } from "@angular/core";
import { SoNetConfigService } from "@iradek/sonet-appskit";
@Injectable({ providedIn: 'root' })
export class SoNetAppConfig extends SoNetConfigService {
configFilePath = 'assets/sonet.config.json';
}
*.module.ts
import { SoNetAppConfig } from './sonetapp.config';
providers: [
{
provide: SoNetConfigService,
useExisting: SoNetAppConfig
}
]
For more information about SoNET engine please visit: http://www.iradek.com
MIT © i-Radek Software