You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
716 B

import LifecycleUnit from '../lifecycle/Unit.ts'
import { Unit } from '../lifecycle/decorators.ts'
import { dotenv } from '../external/std.ts'
import { Logging } from '../service/logging/Logging.ts'
import StandardLogger from '../service/logging/StandardLogger.ts'
@Unit()
export default class Scaffolding extends LifecycleUnit {
private config = {}
constructor(
protected logger: Logging
) {
super()
}
public refresh_env() {
this.config = dotenv()
}
public setup_logging() {
StandardLogger.register()
this.logger.info('Logging initialized.', true)
}
public async up() {
this.setup_logging()
this.refresh_env()
}
}