Registry / database / ggs-database

ggs-database

JSON →
library1.2.2jsnpmunverified

GGS Database is a client library for interacting with a remote database service. Version 1.2.2 provides a simple API for CRUD operations on collections via HTTP requests. It uses token-based authentication and project name headers. The library has no notable alternatives, but it is minimal and requires manual setup of host, port, and authentication credentials. Release cadence is unclear, and the library is not actively maintained.

npm install ggs-database
INSTALL
IMPORT
SIG · GGS-DATABASE
G
ggs-database
databasejavascriptv1.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GGSClient
import { GGSClient } from 'ggs-database'
const GGSClient = require('ggs-database')
The package ships TypeScript types and uses named export. CommonJS require will not work in ESM environments.
default import
import { GGSClient } from 'ggs-database'
import GGSClient from 'ggs-database'
There is no default export; only named export exists.
type import
import type { GGSClient } from 'ggs-database'
TypeScript users can use type-only imports to avoid runtime overhead.

Shows how to initialize GGSClient with store config, set data to a collection, and get data from it.

import { GGSClient } from 'ggs-database'; const client = new GGSClient({ store: { username: 'Username', password: 'Password', projectName: 'Your project name', secreteKey: 'Your secrete key', host: 'localhost', port: 3000 } }); // Write data const collection = 'users'; const yourData = { name: 'Alina', age: 23, sex: 'Female', country: 'Ukraine' }; client.set(collection, yourData); // Read data client.get(collection).then((data) => { console.log(data); });
Debug
Known issues
gotchaProperty 'secreteKey' appears to be a typo; likely should be 'secretKey'.
fix
Use 'secreteKey' as defined in the constructor or check for updates.
affects: >=1.0.0
gotchaThe 'set' method for destroying data expects an empty object, not 'delete' method.
fix
Use client.set(collection, {}) to clear all data in the collection.
affects: >=1.0.0
gotchaNo error handling shown in examples; network failures or auth issues may cause unhandled rejections.
fix
Wrap client.get calls in try/catch or add .catch handlers.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: client.set is not a function
Importing incorrectly (default instead of named export).
fix
Use import { GGSClient } from 'ggs-database'.
fetch is not defined
The library uses fetch which is not available in Node.js < 18.
fix
Use Node 18+ or install node-fetch and polyfill.
Upgrade
Version history
1.2.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ggs-database — npm install ggs-database · libregistry