Implemented event emission accessible through the HarperDB class as this.event. Additionally cleaned up a few places in the repo like the package.json and README.md to bring them up to par with standards.
Example:
...
const db = new HarperDB();
db.connect(
"http://localhost:9925",
process.env.HARPERDB_USERNAME,
process.env.HARPERDB_PASSWORD
);
db.event.on('request', function() {
console.log('A request was just made.');
});
db.request({ operation: 'list_users'})
.then(response => {
console.log(response);
})
.catch(e => console.error(e));
...
Implemented event emission accessible through the HarperDB class as
this.event
. Additionally cleaned up a few places in the repo like the package.json and README.md to bring them up to par with standards.Example:
This will log the following: