0.109.4 • Published 11 months ago

@synthql/handler-express v0.109.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@synthql/handler-express

SynthQL-compatible route handler function for use in Express.js server app.

// src/queryEngine.ts
import { QueryEngine } from '@synthql/backend';

export const queryEngine = new QueryEngine({
    url: 'postgresql://user:password@localhost:5432/dbname',
});

// src/index.ts
import express from 'express';
import { createExpressSynthqlHandler } from '@synthql/handler-express';
import { queryEngine } from './queryEngine';

const app = express();
const expressSynthqlRequestHandler = createExpressSynthqlHandler(queryEngine);

app.post('/synthql', async (req, res) => {
    return await expressSynthqlRequestHandler(req, res);
});

app.listen(3000);

Links

0.109.4

11 months ago

0.107.4

12 months ago

0.108.4

12 months ago

0.106.4

12 months ago

0.105.4

1 year ago

0.104.4

1 year ago

0.99.4

1 year ago

0.95.4

1 year ago

0.96.4

1 year ago

0.97.4

1 year ago

0.98.4

1 year ago

0.103.4

1 year ago

0.100.4

1 year ago

0.101.4

1 year ago

0.102.4

1 year ago

0.94.4

1 year ago

0.93.4

1 year ago

0.92.4

1 year ago

0.91.4

1 year ago

0.90.4

1 year ago

0.89.4

1 year ago

0.88.4

1 year ago

0.87.4

1 year ago

0.86.4

1 year ago

0.85.4

1 year ago

0.84.4

1 year ago

0.83.4

1 year ago

0.82.4

1 year ago

0.81.4

1 year ago