diff --git a/config/index.js b/config/index.js index 8b25e45..0b5ff8f 100644 --- a/config/index.js +++ b/config/index.js @@ -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, }; diff --git a/config/production.js b/config/production.js new file mode 100644 index 0000000..1488960 --- /dev/null +++ b/config/production.js @@ -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: 'hannah.stracke62@ethereal.email', + pass: 'Udhq8A43hSujuuSPS7', + }, + }, + uploadDir: 'uploads-production', + profileDir: 'profile', +}; diff --git a/package.json b/package.json index fe033c1..66c3321 100644 --- a/package.json +++ b/package.json @@ -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",