initial
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import * as paths from './paths.js';
|
||||
import { logger } from './logging.js';
|
||||
|
||||
import { JwtManager } from './classes.jwtmanager.js';
|
||||
import { LoginSessionManager } from './classes.loginsessionmanager.js';
|
||||
import { RegistrationSessionManager } from './classes.registrationsessionmanager.js';
|
||||
import { ReceptionServer } from './classes.receptionserver.js';
|
||||
import { ReceptionDb } from './classes.receptiondb.js';
|
||||
import { ReceptionMailer } from './classes.receptionmailer.js';
|
||||
import { UserManager } from './classes.usermanager.js';
|
||||
import { ApiTokenManager } from './classes.apitokenmanager.js';
|
||||
import { ReceptionHousekeeping } from './classes.housekeeping.js';
|
||||
import { OrganizationManager } from './classes.organizationmanager.js';
|
||||
import { RoleManager } from './classes.rolemanager.js';
|
||||
import { BillingPlanManager } from './classes.billingplanmanager.js';
|
||||
|
||||
export class Reception {
|
||||
public projectinfoNpm = new plugins.projectinfo.ProjectinfoNpm(paths.packageDir);
|
||||
public typedrouter = new plugins.typedrequest.TypedRouter();
|
||||
public serviceQenv = new plugins.qenv.Qenv('./', './.nogit');
|
||||
public szPlatformClient = new plugins.szPlatformClient.SzPlatformClient();
|
||||
public db = new ReceptionDb(this);
|
||||
|
||||
// server
|
||||
public serviceServer = new ReceptionServer(this);
|
||||
|
||||
// managers
|
||||
public jwtManager = new JwtManager(this);
|
||||
public loginSessionManager = new LoginSessionManager(this);
|
||||
public registrationSessionManager = new RegistrationSessionManager(this);
|
||||
public apitokenManager = new ApiTokenManager(this);
|
||||
public receptionMailer = new ReceptionMailer(this);
|
||||
public userManager = new UserManager(this);
|
||||
public organizationmanager = new OrganizationManager(this);
|
||||
public roleManager = new RoleManager(this);
|
||||
public billingPlanManager = new BillingPlanManager(this);
|
||||
housekeeping = new ReceptionHousekeeping(this);
|
||||
|
||||
constructor(public databaseName?: string) {}
|
||||
|
||||
/**
|
||||
* starts the reception instance
|
||||
*/
|
||||
public async start() {
|
||||
logger.log('info', 'starting reception');
|
||||
await this.db.start(this.databaseName);
|
||||
await this.jwtManager.start();
|
||||
await this.serviceServer.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* stops the reception instance
|
||||
*/
|
||||
public async stop() {
|
||||
await this.housekeeping.stop();
|
||||
await this.serviceServer.stop();
|
||||
console.log('stopped serviceserver!');
|
||||
await this.db.stop();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user