dataservices-api/client/README.md

55 lines
1.4 KiB
Markdown
Raw Normal View History

2016-07-11 16:51:51 +08:00
# CARTO Data Services API client extension
Postgres extension for the CARTO Data Services API, client side.
2015-11-23 17:12:06 +08:00
## Dependencies
This extension is thought to be used on top of CartoDB geocoder extension, for the multiples available geocoders (internal, nokia, etc).
The following is a non-comprehensive list of dependencies:
- Postgres 9.3+
- Postgis extension
- Schema triggers extension
2016-07-11 16:51:51 +08:00
- cartodb-postgresql CARTO extension
2015-11-23 17:12:06 +08:00
## Installation into the db cluster
This requires root privileges
```
sudo make all install
```
## Execute tests
```
PGUSER=postgres make installcheck
```
## Build, install & test
One-liner:
```
sudo PGUSER=postgres make all install installcheck
```
2016-07-11 16:51:51 +08:00
## Install onto a CARTO user's database
2015-11-23 17:12:06 +08:00
```
psql -U postgres cartodb_dev_user_fe3b850a-01c0-48f9-8a26-a82f09e9b53f_db
```
and then:
```sql
CREATE EXTENSION cdb_dataservices_client;
2015-11-23 17:12:06 +08:00
```
The extension creation in the user's db requires **superuser** privileges.
2016-07-29 23:51:38 +08:00
2016-07-29 23:52:18 +08:00
## User database configuration
After installing the client extension in a database, you will need to set up your configuration to be able to connect with the server.
2016-07-29 23:51:38 +08:00
```
-- Point to the dataservices server DB (you can use a specific database for the server or your same user's):
SELECT CDB_Conf_SetConf('geocoder_server_config', '{ "connection_str": "host=localhost port=5432 dbname=<SERVER_DB_NAME> user=postgres"}');
SELECT CDB_Conf_SetConf('user_config', '{"is_organization": false, "entity_name": "<YOUR_USERNAME>"}');
```