2011-06-13 11:23:02 +08:00
|
|
|
SQL API for cartodb.com
|
|
|
|
========================
|
2012-06-02 04:19:02 +08:00
|
|
|
|
2011-10-08 00:19:02 +08:00
|
|
|
Provides a nodejs based API for running SQL queries against CartoDB.
|
2011-06-13 11:23:02 +08:00
|
|
|
|
2012-06-02 04:19:02 +08:00
|
|
|
* Users are authenticated over OAuth or via an API KEY.
|
|
|
|
* Authenticated requests to this API should always be made over SSL.
|
2011-06-13 11:23:02 +08:00
|
|
|
|
2011-10-08 00:19:02 +08:00
|
|
|
|
2011-06-30 19:13:13 +08:00
|
|
|
core requirements
|
|
|
|
-------------
|
2012-07-13 04:05:09 +08:00
|
|
|
* postgres 9.0+
|
|
|
|
* cartodb 0.9.5+ (for CDB_QueryTables)
|
2011-06-30 19:13:13 +08:00
|
|
|
* redis
|
2012-07-17 01:13:03 +08:00
|
|
|
* node > v0.4.8 && < v0.9.0
|
2011-06-30 19:13:13 +08:00
|
|
|
* npm
|
|
|
|
|
2012-03-14 02:32:01 +08:00
|
|
|
usage
|
|
|
|
-----
|
|
|
|
|
2012-03-16 17:31:03 +08:00
|
|
|
Edit config/environments/<environment>.js
|
2012-03-14 02:32:01 +08:00
|
|
|
Make sure redis is running and knows about active cartodb user.
|
|
|
|
|
|
|
|
``` bash
|
2012-03-16 17:31:03 +08:00
|
|
|
node [cluster.js|app.js] <environment>
|
2012-03-14 02:32:01 +08:00
|
|
|
```
|
|
|
|
|
2012-03-16 17:31:03 +08:00
|
|
|
Supported <environment> values are developement, test, production
|
|
|
|
|
2012-03-14 02:32:01 +08:00
|
|
|
for examples of use, see /tests
|
|
|
|
|
2011-06-30 20:06:23 +08:00
|
|
|
|
2012-03-16 18:46:34 +08:00
|
|
|
Install dependencies
|
2011-10-08 00:19:02 +08:00
|
|
|
---------------------
|
2011-06-30 19:13:13 +08:00
|
|
|
|
2011-10-08 00:19:02 +08:00
|
|
|
```bash
|
|
|
|
npm install
|
|
|
|
```
|
2011-06-30 19:13:13 +08:00
|
|
|
|
2011-07-01 00:10:10 +08:00
|
|
|
|
2011-10-08 00:19:02 +08:00
|
|
|
tests
|
|
|
|
------
|
2012-03-16 18:47:10 +08:00
|
|
|
see test/README.md
|
2012-03-16 21:18:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
note on 0.4.x
|
|
|
|
--------------
|
2012-07-17 01:13:03 +08:00
|
|
|
output of large result sets is slow under node 0.4. Recommend running under 0.6 where possible.
|