Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
feat: switch to .js based configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Coe committed Nov 8, 2016
1 parent 8a3860a commit ff48abd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
12 changes: 12 additions & 0 deletions config-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
connection: {
driver: "pg",
user: "postgres",
host: "0.0.0.0",
database: "oauth2_server"
},
pool: {
min: 0,
max: 7
}
}
12 changes: 0 additions & 12 deletions config-test.json

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
"main": "./lib/server.js",
"bin": "./bin/oauth2-server-pg.js",
"scripts": {
"pretest": "standard; if pgrep \"docker\" > /dev/null; then (npm run pg-test-down || true) && npm run pg-test-up; sleep 5; fi",
"posttest": "standard",
"pretest": "if pgrep \"docker\" > /dev/null; then (npm run pg-test-down || true) && npm run pg-test-up; sleep 5; fi",
"test": "nyc mocha --timeout=5000 test/*.js",
"posttest": "if pgrep \"docker\" > /dev/null; then npm run pg-test-down; fi",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"pg-test-up": "docker run --name oauth2serverpg_postgres_1 -e POSTGRES_DB=oauth2_server -p 5432:5432/tcp -d postgres:9.4 postgres",
"pg-test-down": "docker rm -f oauth2serverpg_postgres_1",
"pg-test": "npm run pg-test-up; sleep 5; npm run migrate-test",
"migrate-test": "db-migrate --config=./config-test.json --env=connection up",
"migrate-test": "db-migrate --config=./config-test.js --env=connection up",
"psql": "docker exec -it oauth2serverpg_postgres_1 psql -U postgres -d oauth2_server",
"migrate": "db-migrate --config=./config.json --env=connection",
"migrate": "db-migrate --config=./config.js --env=connection",
"release": "standard-version"
},
"repository": {
Expand Down

0 comments on commit ff48abd

Please sign in to comment.