@wts-data-table/server
v1.0.0
Published
Node.js server handlers and database adapters for WTS Data Table.
Maintainers
Readme
@wts-data-table/server
Node.js backend package for WTS Data Table. It exposes the SQL, PostgreSQL,
MySQL, SQLite, Knex, and Prisma adapters previously available through
wts-data-table/server-db, plus framework-neutral request processing and thin
Express, GraphQL, and Fetch handlers.
import {
createDataTableExpressHandler,
createDataTablePostgreSqlAdapter,
} from '@wts-data-table/server';
const adapter = createDataTablePostgreSqlAdapter({
client: pool,
columns,
cursorSecret: process.env.CURSOR_SECRET!,
primaryKey: 'id',
table: 'people',
});
app.post('/api/data-table', createDataTableExpressHandler({
adapter,
maxPageSize: 100,
}));The package validates protocol version 1 before calling the database adapter. It has no Express, GraphQL, database-driver, ORM, or upload dependency; host applications inject those implementations.
Migration
Replace imports from wts-data-table/server-db with
@wts-data-table/server. The original subpath remains available during the
1.x compatibility window.
