1.0.3 • Published 9 years ago

loopback-connector-pgenv v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

loopback-connector-pgenv

loopback postgres connector that can be configured with environment variable tokens

Usage

In a loopback application, add an entry to server/datasources.json, with the "properties" section containing the properties to pass into the postgresql connector. Values can be replaced with $ENV_VARIABLE_NAME, like this:

"myDataSource": {
	"connector": "pgenv",
	"properties": {
		"name": "myDataSource",
		"connector": "postgresql",
		"url": "$DATABASE_URL"
	}
}

This will replace the "url" setting with the value of the DATABASE_URL environment variable.

This can also use the following format:

"myDataSource": {
	"connector": "pgenv",
	"properties": {
		"name": "myDataSource",
		"host": "$DB_HOST",
		"port": "$DB_PORT",
		"database": "$DB_NAME",
		"username": "$DB_USER",
		"password": "$DB_PASS",
		"name": "postgres",
		"connector": "postgresql",
		"ssl": true
	}
}
1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

0.0.1

9 years ago

1.0.0

9 years ago