diff --git a/server/database/knex.js b/server/database/knex.js index fb11ece0..03de907a 100644 --- a/server/database/knex.js +++ b/server/database/knex.js @@ -1,6 +1,7 @@ const expect = require('expect-runtime'); const connection = require('../../config/config').connectionString; expect(connection).to.match(/^postgresql:\//); +const log = require("loglevel"); let knexConfig = { client: 'pg', @@ -9,9 +10,12 @@ let knexConfig = { pool: { min:0, max: 100}, } +log.debug('hello') +log.info(process.env.DATABASE_SCHEMA) if(process.env.DATABASE_SCHEMA){ knexConfig.searchPath = [process.env.DATABASE_SCHEMA] } +log.info(knexConfig.searchPath) const knex = require('knex')(knexConfig); diff --git a/server/server.js b/server/server.js index e4d928ef..21a5cb04 100644 --- a/server/server.js +++ b/server/server.js @@ -1,9 +1,9 @@ require('dotenv').config() -const app = require("./app"); -//set the log level +const log = require("loglevel"); +//setup log level require("./setup"); +const app = require("./app"); const port = process.env.NODE_PORT || 3006; -const log = require("loglevel"); app.listen(port,()=>{ log.info('listening on port:' + port);