import { ConfigClient, ConfigRequire, value } from '../src'


process.env['KT_ME_ENV'] = "TEST"
process.env['KT_ME_ENV_KEY'] = "c8b5dcf116a64b87bad4f1e000fbc2db"
process.env['KT_CONFIG_LOCAL_PATH'] = "D:/test"
process.env['KT_CONFIG_SERVER_URL'] = "http://47.111.146.115:3008/conf/"

const configRequire: ConfigRequire = {
    version: '1.0',
    configCode: 'PC.database'
}

const client = new ConfigClient();
(
    async () => {
        await client.initClient([configRequire]);

        console.info('get function-->' + client.getConfig('config.test'))

        console.info(new Foo().config)


        console.info( client.getAllConfig()['config.test'] )

    }
)()



export class Foo {

    @value('config.test')
    config?: string

}