pgsql-proxy-middleware
v0.0.3
Published
The one-liner node.js RESTful middleware for PostgreSQL tables.
Downloads
4
Maintainers
Readme
pgsql-proxy-middleware
The one-liner node.js RESTful middleware for PostgreSQL tables.
Install
npm
npm i pgsql-proxy-middleware
yarn
yarn add pgsql-proxy-middleware
setupProxy.js
const bodyParser = require('body-parser');
const proxy = require('pgsql-proxy-middleware');
module.exports = function(app) {
app.use(bodyParser.json(), proxy({
database: '<database name>',
user: '<username>',
...
}, '<table-name>'));
};