constructor()

in lib/template/app-context.ts [44:62]


    constructor(props: AppContextProps) {
        this.cdkApp = new cdk.App();

        try {
            const appConfigFile = this.findAppConfigFile(props.appConfigFileKey);

            this.appConfig = this.loadAppConfigFile(appConfigFile, props.contextArgs);

            if (this.appConfig != undefined) {
                this.stackCommonProps = this.createStackCommonProps(appConfigFile);
            }

        } catch (e) {
            console.error(`==> CDK App-Config File is empty, 
            set up your environment variable(Usage: export ${props.appConfigFileKey}=config/app-config-xxx.json) 
            or append inline-argurment(Usage: cdk list --context ${props.appConfigFileKey}=config/app-config-xxx.json)`);
            throw new AppContextError('Fail to find App-Config json file');
        }
    }