Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .env File #105

Merged
merged 10 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ An easier solution would be to use Docker.

**Setup**
1. Navigate to the root directory of telescope.
1. Copy env.example to .env to create a new environment configuration.
1. Replace default key values in .env with credentials.
1. Run `npm install`.
1. Run `npm start` to start telescope.
*If you get a series of errors, you may have to start redis-server depending on your installation configuration, do this by running the command `redis-server` in a seperate command window).*
Expand Down
5 changes: 5 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# NODE_ENV should be one of "development" or "production"
NODE_ENV=development

# PORT is the port used by the web server
PORT=8080
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"homepage": "https://github.com/Seneca-CDOT/telescope#readme",
"dependencies": {
"bent": "^7.0.2",
"bull": "^3.11.0"
"bull": "^3.11.0",
"dotenv": "^8.2.0"
},
"devDependencies": {
"eslint": "^6.6.0",
Expand Down
3 changes: 3 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const dotenv = require('dotenv');

dotenv.config();