waterline-postgresql
v0.50.0
Published
PostgreSQL Adapter for Sails and Waterline
Downloads
126
Maintainers
Readme
PostgreSQL Waterline Adapter
A Waterline adapter for PostgreSQL, with PostGIS support.
This package was last updated in 2015. For the most up-to-date information and tools related to PostgreSQL and Waterline adapters in Sails, visit the official Sails website or ask for help.
Features
- 100% re-write of the original sails-postgresql adapter in ES6. And way faster.
- Uses knex.js for query building and connection pooling
- PostGIS 2.1+ Support
Compatibility
- Waterline v0.11 and later
- PostgreSQL 9.4 and later
Install
$ npm install waterline-postgresql --save
Configuration
config/connections.js
module.exports.connections = {
// ...
postgresdb: {
/**
* This 'connection' object could also be a connection string
* e.g. 'postgresql://user:password@localhost:5432/databaseName?ssl=false'
*/
connection: {
database: 'databaseName',
host: 'localhost',
user: 'user',
password: 'password',
port: 5432,
ssl: false
},
/**
* Pool configuration
*/
pool: {
min: 2,
max: 20
}
}
}
License
MIT