XYZ - Developer Guide
  • Introduction
  • Licence
  • Deploying
    • Local Deployments
  • Access
    • Access Control List (ACL)
    • User account registration
    • Password reset
    • Failed login attempts
  • Environment Settings
    • Hosting
    • Access Control
    • Workspace Connections
    • 3rd party API keys
  • Workspaces
    • Title
    • Documentation
    • Locate
    • Locales
      • Gazetteer
    • Layers
      • Tile Layer
      • PostGIS Data Layers
      • Cluster Layer
      • GeoJSON Layer
      • MapBox Vector Tile (MVT) Layer
      • Grid (Hex) Layer
      • Filter
    • Locations
      • infoj
        • Groups
        • Filter
        • Lookups
        • withSelect
        • Table definition
        • Ordered list
        • Geometry
    • Editing
    • Access Restrictions & Filter
    • Workspace Checks
  • Routes
    • / (root)
    • /proxy/request
    • /api
      • /gazetteer
        • /autocomplete
        • /googleplaces
      • /layer
        • /cluster
        • /extent
        • /geojson
        • /grid
        • /mvt/:z/:x/:y
      • /location
        • /edit
          • /delete
          • /image/delete
          • /image/upload
          • /draw
          • /draw/catchment
          • /catchment/create
          • /catchment/delete
          • /update
        • /select
          • /id
          • /cluster
          • /latlng/contains
          • /latlng/nnearest
          • /latlng/intersects
          • /aggregate
        • /field/range
    • /auth
      • /login
      • /register
      • /token
        • /api
        • /renew
      • /user
        • /admin
        • /verify
        • /approve
        • /update
        • /delete
    • /workspace
      • /get
      • /load
      • /admin
      • /admin/json
  • Infrastructure
    • _xyz
      • host
      • layer
      • location
      • mapview
      • tableview
    • Dependencies
      • Webpack
      • SASS
    • Testing
    • Security
      • JWT token
      • Strategy
      • SQL Injections
    • Server
    • Client
Powered by GitBook
On this page
  • Workspace files
  • PostGIS Database Connections
  1. Environment Settings

Workspace Connections

PreviousAccess ControlNext3rd party API keys

Last updated 6 years ago

A and associated database connections must be defined in the environment settings.

"WORKSPACE": "postgres://username:password@123.123.123.123:5432/database|schema.table"

The WORKSPACE key value is a plus table definition. A table with a zero configuration workspace will created if the table does not exist. The database user must have privileges to create a new table in the defined schema and add records to the workspace table.

Below is the PostgreSQL schema for workspace tables.

create table settings
(
	"_id" serial not null,
	settings json
);

Workspace files

"WORKSPACE": "file:demo.json"

With the file: prefix the server will look for a workspace document in the of the repository. Serving a workspace from a file makes it impossible to modify the workspace which is loaded into the backend memory.

PostGIS Database Connections

Connection strings must be provided for all data sources which are referenced in a workspace.

"DBS_XYZ": "postgres://username:password@123.123.123.123:5432/database"

Keys beginning with DBS_ store PostGIS data source connections. During the keys are used to register PostgreSQL database connections. The remainder of the "DBS_***" string is the key for the database connection. This key must be referenced as the dbs parameter in workspace definitions.

workspace
pg-connection-string
in the workspaces directory
startup
layer