diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..2ed75d5 --- /dev/null +++ b/.env.example @@ -0,0 +1,18 @@ +################################################################################ +# Environment Configuration +################################################################################ + +NODE_ENV=development +HOST=localhost + +# Enable/disable protocols +HTTP=true +HTTPS=false + +# Server ports +HTTP_PORT=3000 +HTTPS_PORT=3443 + +# Certificate paths are relative to the server.js file +HTTPS_CONFIG_KEY=localhost.key +HTTPS_CONFIG_CERT=localhost.crt \ No newline at end of file diff --git a/app/base/Config.js b/app/base/Config.js index 37633eb..7c60e45 100644 --- a/app/base/Config.js +++ b/app/base/Config.js @@ -16,12 +16,10 @@ const configPath = path.resolve(__dirname, '../config'); const defaultConfig = new Map([ ['host', 'localhost'], - ['http', false], + ['http', true], ['http-port', 80], - ['https', true], + ['https', false], ['https-port', 443], - ['https-config-cert', path.join(configSslPath, 'localhost.crt')], - ['https-config-key', path.join(configSslPath, 'localhost.key')], ['node-env', 'development'], ]); diff --git a/package.json b/package.json index 1f5af09..eb6737c 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,31 @@ { "author": "Timothy J. Warren", "dependencies": { - "bluebird": "^3.1.1", + "axios": "^0.9.1", "body-parser": "~1.13.2", "cookie-parser": "~1.3.5", "debug": "~2.2.0", + "dotenv": "^2.0.0", + "errors": "^0.3.0", + "eslint": "^1.10.3", "express": "4.*", + "getargs": "0.0.8", "glob": "^6.0.4", "helmet": "^1.1.0", + "lodash": "^4.5.0", "morgan": "~1.6.1", - "nconf": "^0.8.2", - "node-dev": "^2.7.1", + "nodemon": "^1.9.0", "winston": "^2.1.1" }, "description": "An Opinionated Take on express with use of ES6 features", "devDependencies": { - "chai": "3.4.*", + "chai": "^3.4.1", + "chai-as-promised": "^5.2.0", "eslint": "1.10.*", "gulp": "3.9.*", "gulp-apidoc": "0.2.*", "gulp-documentation": "2.1.*", - "gulp-eslint": "1.1.*", + "gulp-eslint": "^2.0.0", "gulp-istanbul": "^0.10.3", "gulp-jscs": "3.0.*", "gulp-mocha": "2.2.*", @@ -55,7 +60,7 @@ "url": "https://github.com/timw4mail/crispy-train.git" }, "scripts": { - "start": "node-dev server.js", + "start": "nodemon server.js", "gulp": "gulp default", "test": "gulp test" },