Skip to content

Commit

Permalink
1406-organizing-npm-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
basarbk committed Aug 4, 2020
1 parent b239cd4 commit e1192f5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
2 changes: 2 additions & 0 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const development = require('./development');
const staging = require('./staging');
const test = require('./test');
const production = require('./production');

module.exports = {
development,
staging,
test,
production,
};
20 changes: 20 additions & 0 deletions config/production.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
database: {
database: 'hoaxify',
username: 'my-db-user',
password: 'db-p4ss',
dialect: 'sqlite',
storage: './prod-db.sqlite',
logging: false,
},
mail: {
host: 'smtp.ethereal.email',
port: 587,
auth: {
user: '[email protected]',
pass: 'Udhq8A43hSujuuSPS7',
},
},
uploadDir: 'uploads-production',
profileDir: 'profile',
};
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "tdd with express",
"main": "app.js",
"scripts": {
"start": "cross-env NODE_ENV=development nodemon index",
"test": "cross-env NODE_ENV=test jest --watch",
"posttest": "cross-env NODE_ENV=test node test-cleanup",
"start:dev": "cross-env NODE_ENV=development npm run migrate && cross-env NODE_ENV=development nodemon index",
"start": "cross-env NODE_ENV=production npm run migrate && cross-env NODE_ENV=production node index",
"test": "cross-env NODE_ENV=test jest --watch && cross-env NODE_ENV=test npm run clean-up",
"test:staging": "cross-env NODE_ENV=staging npm run migrate && cross-env NODE_ENV=staging jest -f . --runInBand --forceExit && cross-env NODE_ENV=staging npm run clean-up",
"clean-up": "node test-cleanup",
"lint": "eslint .",
"test:staging": "cross-env NODE_ENV=staging jest -f . --runInBand",
"migrate:test": "cross-env NODE_ENV=staging sequelize-cli db:migrate",
"pretest:staging": "npm run migrate:test"
"migrate": "sequelize-cli db:migrate"
},
"author": "Basar Buyukkahraman",
"license": "ISC",
Expand Down

0 comments on commit e1192f5

Please sign in to comment.