diff --git a/.gitignore b/.gitignore index bfacf99..0ca9b85 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ www node_modules public/repos/ +.env diff --git a/index.js b/index.js index 386c399..f97c583 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ // Require dependencies +const dotenv = require('dotenv').config(); const fs = require('fs'); const timeago = require('timeago.js'); const repos = require('github-user-repos'); diff --git a/package-lock.json b/package-lock.json index f8f662f..69879e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1611,6 +1611,11 @@ "is-obj": "^1.0.0" } }, + "dotenv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==" + }, "double-ended-queue": { "version": "2.1.0-0", "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", diff --git a/package.json b/package.json index 706a81a..319ea45 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "This is a list of my open-source software hosted here on GitHub! More to come soon.", "main": "index.js", "scripts": { - "serve": "node index.js; harp server --port $PORT", + "serve": "node index.js; harp server --port ${PORT:-9000}", "build": "node index.js; harp compile", "test": "echo \"Error: no test specified\" && exit 1" }, @@ -31,6 +31,7 @@ "homepage": "https://github.com/pschfr/labs#readme", "dependencies": { "capture-website": "^0.2.1", + "dotenv": "^6.2.0", "github-user-repos": "^1.0.2", "harp": "^0.29.0", "tachyons-sass": "^4.9.5",