import { JsonFileConfigStore, ConfigSet, ConfigSchema, UpsertCommand, EvalCommand, ExportCommand } from '@configu/node';
import schemaContents from './start.cfgu.json';
(async () => {
try {
const store = new JsonFileConfigStore({ path: 'config-db.json' });
const set = new ConfigSet('test');
const schema = new ConfigSchema('start', schemaContents);
await new UpsertCommand({
store,
set,
schema,
configs: {
GREETING: 'hey',
SUBJECT: 'configu node.js sdk',
},
}).run();
const data = await new EvalCommand({
store,
set,
schema,
}).run();
const configurationData = await new ExportCommand({
pipe: data,
}).run();
} catch (error) {
console.error(error);
}
})();