2.0.3 • Published 4 years ago

stevesdb-client-node v2.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

StevesDB-Client-Node

StevesDB database client written for Node.js

Usage

Connecting to a StevesDB Server and logging in:

const { StevesDBClient } = require("stevesdb-client-node");

const client = new StevesDBClient();

async function run() {
    try {
        await client.connect("127.0.0.1", 2540); // Connect to the server
    } catch(e) {
        console.error(`Unable to connect to the server: ${e}`);
        return;
    }
    if(!await client.login("stevesdb", "password")) { // Log in to the server and print a message if the provided credentials are invalid
        console.error("Invalid username or password");
        return;
    }
}
run();

You can read more about the client features here