Make RadiusServer singleton

master
Garrett Mills 2 years ago
parent 9c7380a94f
commit 05278bda0c

@ -6,8 +6,21 @@ import { RadiusService } from './RadiusService';
const packageInterface = PackageInterface.get();
export class RadiusServer {
private static instance?: RadiusServer;
public static get(): RadiusServer {
if (!this.instance) {
this.instance = new this();
}
return this.instance;
}
private server?: UDPServer;
// eslint-disable-next-line @typescript-eslint/no-empty-function
private constructor() {}
public async up(): Promise<void> {
const config = packageInterface.getConfig();
const AuthMechanismus = (await import(`../auth/${config.authentication}`))[

Loading…
Cancel
Save