Skip to content

Commit

Permalink
fix: add env for database to example
Browse files Browse the repository at this point in the history
  • Loading branch information
ZavenArra committed Feb 24, 2021
1 parent e0abf00 commit 6804e77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DATABASE_URL=postgresql://xxxxx:xxxxxxx@xxxxxxx.ondigitalocean.com:25060/database?ssl=true
DATABASE_SCHEMA=schema_name
NODE_LOG_LEVEL=debug
4 changes: 1 addition & 3 deletions server/database/knex.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
const expect = require('expect-runtime');
const connection = require('../../config/config').connectionString;
expect(connection).to.match(/^postgresql:\//);
const log = require("loglevel");

let knexConfig = {
client: 'pg',
debug: process.env.NODE_LOG_LEVEL === "debug"? true:false,
connection,
process.env.DATABASE_URL,
pool: { min:0, max: 100},
}

Expand Down

0 comments on commit 6804e77

Please sign in to comment.