Registry / database / dbgate-rest

dbgate-rest

JSON →
library7.1.13jsnpmunverified

REST API support for DbGate, a SQL database management tool. Version 7.1.13 provides REST endpoints for querying, managing schemas, and executing SQL commands remotely. Updated regularly alongside DbGate releases. Key differentiator: integrates with DbGate's full query builder and connection management; not a generic REST client.

npm install dbgate-rest
INSTALL
IMPORT
SIG · DBGATE-REST
D
dbgate-rest
databasejavascriptv7.1.13
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.

createRestApi
import { createRestApi } from 'dbgate-rest';
import createRestApi from 'dbgate-rest';
ESM only; named export.
RestApi
import type { RestApi } from 'dbgate-rest';
Type import for TypeScript users.
startRestServer
import { startRestServer } from 'dbgate-rest';
const { startRestServer } = require('dbgate-rest');
ESM only; CommonJS require not supported.

Shows how to create an Express-based REST server using dbgate-rest.

import { createRestApi } from 'dbgate-rest'; import express from 'express'; const app = express(); const api = createRestApi(); app.use('/api', api); app.listen(3000, () => console.log('Server running on port 3000'));
Debug
Known issues
breakingVersion 7.x requires DbGate 7+ and Node 14+.
fix
Update DbGate to version 7 or later; ensure Node >=14.
affects: >=7.0.0
breakingESM-only since v7. CommonJS require() will fail.
fix
Use import syntax or switch to dynamic import().
affects: >=7.0.0
gotchaREST endpoints are mounted under a base path; ensure middleware does not interfere.
fix
Check your Express app's route prefixes and body parsing.
affects: >=6.0.0
deprecatedThe `api` property on RestApi instance is deprecated; use the router directly.
fix
Replace `api.api` with `api`.
affects: >=7.0.0
Errors
Common errors & fixes
Cannot find module 'dbgate-rest'
Package not installed or wrong import path.
fix
Run `npm install dbgate-rest` or `yarn add dbgate-rest`.
TypeError: createRestApi is not a function
Using default import instead of named import.
fix
Use `import { createRestApi } from 'dbgate-rest';`
SyntaxError: Cannot use import statement outside a module
Using ESM import in a CommonJS file.
fix
Set "type": "module" in package.json or switch to require() (but require is not supported in v7+).
Upgrade
Version history
7.1.13latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
dbgate-rest — npm install dbgate-rest · libregistry