Set up better development defaults
This commit is contained in:
parent
a37aaf0576
commit
0c712f4927
18
.env.example
Normal file
18
.env.example
Normal file
@ -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
|
@ -16,12 +16,10 @@ const configPath = path.resolve(__dirname, '../config');
|
|||||||
|
|
||||||
const defaultConfig = new Map([
|
const defaultConfig = new Map([
|
||||||
['host', 'localhost'],
|
['host', 'localhost'],
|
||||||
['http', false],
|
['http', true],
|
||||||
['http-port', 80],
|
['http-port', 80],
|
||||||
['https', true],
|
['https', false],
|
||||||
['https-port', 443],
|
['https-port', 443],
|
||||||
['https-config-cert', path.join(configSslPath, 'localhost.crt')],
|
|
||||||
['https-config-key', path.join(configSslPath, 'localhost.key')],
|
|
||||||
['node-env', 'development'],
|
['node-env', 'development'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
17
package.json
17
package.json
@ -1,26 +1,31 @@
|
|||||||
{
|
{
|
||||||
"author": "Timothy J. Warren",
|
"author": "Timothy J. Warren",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bluebird": "^3.1.1",
|
"axios": "^0.9.1",
|
||||||
"body-parser": "~1.13.2",
|
"body-parser": "~1.13.2",
|
||||||
"cookie-parser": "~1.3.5",
|
"cookie-parser": "~1.3.5",
|
||||||
"debug": "~2.2.0",
|
"debug": "~2.2.0",
|
||||||
|
"dotenv": "^2.0.0",
|
||||||
|
"errors": "^0.3.0",
|
||||||
|
"eslint": "^1.10.3",
|
||||||
"express": "4.*",
|
"express": "4.*",
|
||||||
|
"getargs": "0.0.8",
|
||||||
"glob": "^6.0.4",
|
"glob": "^6.0.4",
|
||||||
"helmet": "^1.1.0",
|
"helmet": "^1.1.0",
|
||||||
|
"lodash": "^4.5.0",
|
||||||
"morgan": "~1.6.1",
|
"morgan": "~1.6.1",
|
||||||
"nconf": "^0.8.2",
|
"nodemon": "^1.9.0",
|
||||||
"node-dev": "^2.7.1",
|
|
||||||
"winston": "^2.1.1"
|
"winston": "^2.1.1"
|
||||||
},
|
},
|
||||||
"description": "An Opinionated Take on express with use of ES6 features",
|
"description": "An Opinionated Take on express with use of ES6 features",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "3.4.*",
|
"chai": "^3.4.1",
|
||||||
|
"chai-as-promised": "^5.2.0",
|
||||||
"eslint": "1.10.*",
|
"eslint": "1.10.*",
|
||||||
"gulp": "3.9.*",
|
"gulp": "3.9.*",
|
||||||
"gulp-apidoc": "0.2.*",
|
"gulp-apidoc": "0.2.*",
|
||||||
"gulp-documentation": "2.1.*",
|
"gulp-documentation": "2.1.*",
|
||||||
"gulp-eslint": "1.1.*",
|
"gulp-eslint": "^2.0.0",
|
||||||
"gulp-istanbul": "^0.10.3",
|
"gulp-istanbul": "^0.10.3",
|
||||||
"gulp-jscs": "3.0.*",
|
"gulp-jscs": "3.0.*",
|
||||||
"gulp-mocha": "2.2.*",
|
"gulp-mocha": "2.2.*",
|
||||||
@ -55,7 +60,7 @@
|
|||||||
"url": "https://github.com/timw4mail/crispy-train.git"
|
"url": "https://github.com/timw4mail/crispy-train.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node-dev server.js",
|
"start": "nodemon server.js",
|
||||||
"gulp": "gulp default",
|
"gulp": "gulp default",
|
||||||
"test": "gulp test"
|
"test": "gulp test"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user