Skip to content

Commit

Permalink
fix: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Kpoke committed Oct 28, 2022
1 parent c855b08 commit 8a963b6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jwtRS256.key
jwtRS256.key.pub
keygen.sh
database.json
.env
.env.*
.env.test
.vscode

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"lint:fix": "npm run eslint:fix && npm run prettier:fix",
"eslint": "eslint --report-unused-disable-directives .",
"eslint:fix": "npm run eslint -- --fix",
"test": "npm run test-unit; npm run test-integration;npm run test-repository",
"test": "npm run test-unit && npm run test-integration && npm run test-repository",
"test-unit": "NODE_ENV=test DOTENV_CONFIG_PATH=.env.test mocha -r dotenv/config --exit --ignore './server/repositories/**/*.spec.js' './server/setup.js' './server/handlers/**/*.spec.js'",
"test-unit-ci": "NODE_ENV=test DOTENV_CONFIG_PATH=.env.ci mocha -r dotenv/config --exit --ignore './server/repositories/**/*.spec.js' './server/setup.js' './server/**/*.spec.js'",
"test-repository": "NODE_ENV=test DOTENV_CONFIG_PATH=.env.test mocha -r dotenv/config --exit ./server/repositories/**/*.spec.js",
"server-test": "DEBUG=loopback:*,express:* NODE_LOG_LEVEL=debug nodemon server/serverTest.js",
"server": "nodemon server/server.js",
"server": "NODE_ENV=development nodemon server/server.js",
"test-seed": "NODE_ENV=test DOTENV_CONFIG_PATH=.env.test mocha -r dotenv/config --timeout 10000 './__tests__/seed.spec.js'",
"test-seed-ci": "NODE_ENV=test DOTENV_CONFIG_PATH=.env.ci mocha -r dotenv/config --timeout 10000 './__tests__/seed.spec.js'",
"test-integration": "NODE_ENV=test DOTENV_CONFIG_PATH=.env.test mocha -r dotenv/config --exit --timeout 20000 './__tests__/*.spec.js' './__tests__/integration/*.spec.js'",
Expand Down
2 changes: 1 addition & 1 deletion server/infra/database/knex.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('dotenv').config();
require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` });
const expect = require('expect-runtime');
const log = require('loglevel');
const knex = require('knex');
Expand Down
14 changes: 7 additions & 7 deletions server/server.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require('dotenv').config()
const log = require("loglevel");
require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` });
const log = require('loglevel');
// setup log level
require("./setup");
const app = require("./app");
require('./setup');
const app = require('./app');

const port = process.env.NODE_PORT || 3006;

app.listen(port,()=>{
log.info(`listening on port:${ port}`);
log.debug("debug log level!");
app.listen(port, () => {
log.info(`listening on port:${port}`);
log.debug('debug log level!');
});

0 comments on commit 8a963b6

Please sign in to comment.