18 lines
488 B
JavaScript
18 lines
488 B
JavaScript
async function main() {
|
|
const {CouchDatabaseClient} = require('../src/classes/couchdb/CouchDatabaseClient');
|
|
|
|
const config = {
|
|
protocol: 'http',
|
|
host: 'localhost',
|
|
port: 5984,
|
|
username: 'admin',
|
|
password: 'secret'
|
|
}
|
|
const client = new CouchDatabaseClient(config);
|
|
const users = client.getCollection('user');
|
|
|
|
const user = await users.create({name: 'testUser1', email: 'testUser1@example.com' });
|
|
}
|
|
|
|
main();
|