Comparing version 0.1.0 to 0.1.1
@@ -0,1 +1,4 @@ | ||
0.1.1 / 2013-12-18 | ||
* update plv8x so --client is more reentrant-safe | ||
0.1.0 / 2013-12-1 | ||
@@ -2,0 +5,0 @@ * plugin infrastructure |
@@ -65,4 +65,2 @@ // Generated by LiveScript 1.2.0 | ||
cookiename: argv.cookiename || cfg.cookiename || null, | ||
app: argv.app || cfg.appname || null, | ||
websocket: argv.websocket || false, | ||
argv: argv, | ||
@@ -92,5 +90,2 @@ cfg: cfg | ||
pgrest.initPlugins()(opts); | ||
if (bootstrap == null && opts.app != null) { | ||
bootstrap = require(opts.app); | ||
} | ||
if ('function' !== typeof bootstrap) { | ||
@@ -97,0 +92,0 @@ bootstrap = (pkg = bootstrap) |
@@ -16,3 +16,5 @@ // Generated by LiveScript 1.2.0 | ||
} | ||
return plv8x['new'](conString, function(plx){ | ||
return plv8x['new'](conString, { | ||
client: config.client | ||
}, function(plx){ | ||
var doImport; | ||
@@ -19,0 +21,0 @@ doImport = function(cb){ |
@@ -10,3 +10,3 @@ { | ||
"description": "enable REST in postgres", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"main": "lib/index.js", | ||
@@ -31,3 +31,3 @@ "bin": { | ||
"trycatch": "1.0.x", | ||
"plv8x": "0.6.x", | ||
"plv8x": ">= 0.6.3", | ||
"cors": "2.1.x", | ||
@@ -34,0 +34,0 @@ "connect-csv": "0.0.x", |
@@ -21,6 +21,16 @@ pgrest | ||
PostgreSQL 9.0 is required; we recommend using 9.2 or later. | ||
PostgreSQL 9.0 is required; we recommend using 9.2 or later, and nodejs `0.10.x`. | ||
You need to install the `plv8js` extension for PostgreSQL. If you're on OS X, [Postgres.app](http://postgresapp.com) comes with it pre-installed. Otherwise, see [Installation](https://github.com/clkao/pgrest/wiki/Installation) for details. | ||
After you install, create the `plv8` extension | ||
psql -U <user> -c "create extension plv8" | ||
If you got error message `Reason: image not found` | ||
Please download the version after version `9.2.4.3` | ||
[PostgresApp release notes](https://github.com/PostgresApp/PostgresApp/releases) | ||
Once the extension is installed, simply use `npm` to install pgrest: | ||
@@ -35,5 +45,5 @@ | ||
% psql test | ||
test=# CREATE TABLE foo (id int, info json); | ||
test=# CREATE TABLE foo (_id int, info json, tags text[]); | ||
CREATE TABLE | ||
test=# INSERT INTO foo VALUES (1, '{"f1":1,"f2":true,"f3":"Hi I''m \"Daisy\""}'); | ||
test=# INSERT INTO foo VALUES (1, '{"f1":1,"f2":true,"f3":"Hi I''m \"Daisy\""}', '{foo,bar}'); | ||
INSERT 0 1 | ||
@@ -48,9 +58,15 @@ | ||
curl http://127.0.0.1:3000/collections/foo?q={"id":1} | ||
curl http://127.0.0.1:3000/collections/foo/1 | ||
curl -g 'http://127.0.0.1:3000/collections/foo?q={"_id":1}' | ||
curl -g 'http://127.0.0.1:3000/collections/foo?q={"tags":{"$contains":"foo"}}' | ||
The parameter is similar to [MongoLab's REST API](https://support.mongolab.com/entries/20433053-rest-api-for-mongodb) for listing documents. | ||
Note that if you use `curl`, you should probably use `-g` to prevent curl from expanding `{}`. | ||
## Writing: | ||
echo '{"id": 5,"info": {"counter":5} }' | curl -D - -H 'Content-Type: application/json' -X POST -d @- http://localhost:3000/collections/foo | ||
echo '{"_id": 5,"info": {"counter":5} }' | curl -D - -H 'Content-Type: application/json' -X POST -d @- http://localhost:3000/collections/foo | ||
@@ -57,0 +73,0 @@ # Developing |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
125854
40
88
5
+ AddedBase64@0.2.1(transitive)
+ AddedJSONStream@0.8.41.3.5(transitive)
+ Addedacorn@4.0.135.7.47.4.1(transitive)
+ Addedacorn-node@1.8.2(transitive)
+ Addedacorn-walk@7.2.0(transitive)
+ Addedamdefine@1.0.1(transitive)
+ Addedarray-find-index@1.0.2(transitive)
+ Addedasn1.js@4.10.1(transitive)
+ Addedassert@1.3.0(transitive)
+ Addedastw@2.2.0(transitive)
+ Addedbase64-js@0.0.8(transitive)
+ Addedbn.js@4.12.15.2.1(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedbrowser-pack@3.2.0(transitive)
+ Addedbrowser-resolve@1.11.3(transitive)
+ Addedbrowserify@8.1.3(transitive)
+ Addedbrowserify-aes@1.2.0(transitive)
+ Addedbrowserify-cipher@1.0.1(transitive)
+ Addedbrowserify-des@1.0.2(transitive)
+ Addedbrowserify-rsa@4.1.1(transitive)
+ Addedbrowserify-sign@4.2.3(transitive)
+ Addedbrowserify-zlib@0.1.4(transitive)
+ Addedbuffer@3.6.2(transitive)
+ Addedbuffer-xor@1.0.3(transitive)
+ Addedbuiltins@0.0.7(transitive)
+ Addedcallsite@1.0.0(transitive)
+ Addedcamelcase@1.2.12.1.1(transitive)
+ Addedcamelcase-keys@2.1.0(transitive)
+ Addedcipher-base@1.0.6(transitive)
+ Addedcombine-source-map@0.3.00.6.1(transitive)
+ Addedcommondir@0.0.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconcat-stream@1.4.11(transitive)
+ Addedconsole-browserify@1.2.0(transitive)
+ Addedconstants-browserify@0.0.1(transitive)
+ Addedconvert-source-map@0.3.51.1.3(transitive)
+ Addedcreate-ecdh@4.0.4(transitive)
+ Addedcreate-hash@1.2.0(transitive)
+ Addedcreate-hmac@1.1.7(transitive)
+ Addedcrypto-browserify@3.12.1(transitive)
+ Addedcurrently-unhandled@0.4.1(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddeep-equal@0.2.2(transitive)
+ Addeddefined@0.0.01.0.1(transitive)
+ Addeddeps-sort@1.3.9(transitive)
+ Addeddes.js@1.1.0(transitive)
+ Addeddetective@4.7.1(transitive)
+ Addeddiffie-hellman@5.0.3(transitive)
+ Addeddomain-browser@1.1.7(transitive)
+ Addedduplexer2@0.0.2(transitive)
+ Addedelliptic@6.6.1(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedevents@1.0.2(transitive)
+ Addedevp_bytestokey@1.0.3(transitive)
+ Addedfind-up@1.1.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-stdin@4.0.1(transitive)
+ Addedglob@4.5.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhash-base@3.0.5(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedhosted-git-info@2.8.9(transitive)
+ Addedhttp-browserify@1.7.0(transitive)
+ Addedhttps-browserify@0.0.1(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedindent-string@2.1.0(transitive)
+ Addedindexof@0.0.1(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.12.0.3(transitive)
+ Addedinline-source-map@0.3.10.5.0(transitive)
+ Addedinsert-module-globals@6.6.3(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.16.1(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjson-stable-stringify@0.0.1(transitive)
+ Addedjsonify@0.0.1(transitive)
+ Addedjsonparse@0.0.51.3.1(transitive)
+ Addedlabeled-stream-splicer@1.0.2(transitive)
+ Addedlexical-scope@1.2.0(transitive)
+ Addedload-json-file@1.1.0(transitive)
+ Addedlodash.memoize@3.0.4(transitive)
+ Addedloud-rejection@1.6.0(transitive)
+ Addedmap-obj@1.0.1(transitive)
+ Addedmd5.js@1.3.5(transitive)
+ Addedmeow@3.7.0(transitive)
+ Addedmiller-rabin@4.0.1(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addedminimatch@2.0.10(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmodule-deps@3.9.1(transitive)
+ Addednormalize-package-data@2.5.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedoptimist@0.3.7(transitive)
+ Addedos-browserify@0.1.2(transitive)
+ Addedpako@0.2.9(transitive)
+ Addedparents@1.0.1(transitive)
+ Addedparse-asn1@5.1.7(transitive)
+ Addedparse-json@2.2.0(transitive)
+ Addedpath-browserify@0.0.1(transitive)
+ Addedpath-exists@2.1.0(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpath-platform@0.11.15(transitive)
+ Addedpath-type@1.1.0(transitive)
+ Addedpbkdf2@3.1.2(transitive)
+ Addedpify@2.3.0(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedplv8x@0.7.1(transitive)
+ Addedpretty-bytes@1.0.4(transitive)
+ Addedprocess@0.10.10.11.10(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpublic-encrypt@4.0.3(transitive)
+ Addedpunycode@1.2.41.3.2(transitive)
+ Addedquerystring@0.2.0(transitive)
+ Addedquerystring-es3@0.2.1(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedrandomfill@1.0.4(transitive)
+ Addedread-pkg@1.1.0(transitive)
+ Addedread-pkg-up@1.0.1(transitive)
+ Addedreadable-stream@1.0.342.3.8(transitive)
+ Addedreadable-wrap@1.0.0(transitive)
+ Addedredent@1.0.0(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedresolve@0.3.10.7.41.1.71.22.10(transitive)
+ Addedrfile@1.0.0(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedruglify@1.0.0(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedsha.js@2.4.11(transitive)
+ Addedshallow-copy@0.0.1(transitive)
+ Addedshasum@1.0.2(transitive)
+ Addedshell-quote@0.0.1(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsource-map@0.1.340.1.430.3.00.4.4(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.20(transitive)
+ Addedstream-browserify@1.0.0(transitive)
+ Addedstream-combiner2@1.0.2(transitive)
+ Addedstream-splicer@1.3.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-bom@2.0.0(transitive)
+ Addedstrip-indent@1.0.1(transitive)
+ Addedsubarg@1.0.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedsyntax-error@1.4.0(transitive)
+ Addedthrough2@0.5.11.1.1(transitive)
+ Addedtimers-browserify@1.4.2(transitive)
+ Addedtrim-newlines@1.0.0(transitive)
+ Addedtty-browserify@0.0.1(transitive)
+ Addedtypedarray@0.0.7(transitive)
+ Addeduglify-js@2.2.52.4.24(transitive)
+ Addeduglify-to-browserify@1.0.2(transitive)
+ Addedumd@2.1.0(transitive)
+ Addedurl@0.10.3(transitive)
+ Addedutil@0.10.30.10.4(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
+ Addedvm-browserify@0.0.4(transitive)
+ Addedwindow-size@0.1.0(transitive)
+ Addedwordwrap@0.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxtend@3.0.0(transitive)
+ Addedyargs@3.5.4(transitive)
- Removed@isaacs/cliui@8.0.2(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedboxcars@2.0.0(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedflatten-array@1.0.0(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedfunctools@1.4.0(transitive)
- Removedglob@11.0.0(transitive)
- Removedhogan.js@2.0.0(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@4.0.2(transitive)
- Removedlru-cache@11.0.2(transitive)
- Removedminimatch@10.0.1(transitive)
- Removedminipass@7.1.2(transitive)
- Removedone@2.5.2(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@2.0.0(transitive)
- Removedplv8x@0.6.6(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)
Updatedplv8x@>= 0.6.3