import { cfg, read } from './inc/cfg.js'; read().then(() => { console.log( cfg ); }); /*var config = new (require(__dirname+'/inc/cfg'))(); config.read() .then( data => { config.cfg = data; var lib = new (require(__dirname+'/inc/lib'))(config.cfg); lib.events.on('message', function(msg) { if( msg.event[1] === 'privmsg' ) { var e = lib.reply(msg); console.log( `(${e.time}) ${e.network} -> ${e.channel} -> ${e.user.nick}: ${e.message}` ); } }); }, err => { console.log( "error! " + err ); } )*/