Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pgrest

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pgrest

enable REST in postgres

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

pgrest

Build Status

WARNING: this is work in progress and everything is likely to change!

Slides in lieu of a proper documentation

http://www.audreyt.org/newdict/jekyller/_public/

The first section describes plv8x, and the later sections has some real-world examples such as:

http://www.audreyt.org/newdict/jekyller/_public/?full#pgrest-mongolab-api-server

PgREST is...

  • a JSON document store
  • running inside PostgreSQL
  • working with existing relational data
  • capable of loading Node.js modules
  • compatible with MongoLab's REST API

Install plv8js extension for postgresql

Note: Requires postgresql 9.1 or later. 9.0 will be supported soon.

# for older distros: sudo add-apt-repository ppa:martinkl/ppa
sudo apt-get install libv8-dev

sudo easy_install pgxnclient
sudo pgxn install plv8

Try pgrest:

npm i
npm run prepublish

./node_modules/.bin/plv8x --db tcp://localhost/MYDB --import pgrest:./package.json
./node_modules/.bin/plv8x --db tcp://localhost/MYDB --inject 'plv8x_json pgrest_select(plv8x_json)=pgrest:pgrest_select'

# then this will give you json representation of "sometable":
MYDB=$ select pgrest_select('{"collection": "sometable", "l": 10}');

The parameter is similar to MongoLab's REST API for listing documents: https://support.mongolab.com/entries/20433053-rest-api-for-mongodb

Run test:

createdb test
export TESTDBUSERNAME=postgres # optional
export TESTDBNAME=test
npm i
npm run test

Web server support

FAQs

Package last updated on 06 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc