diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 51768dabaf..d42d1f5129 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -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).* diff --git a/env.example b/env.example new file mode 100644 index 0000000000..b9522af0a8 --- /dev/null +++ b/env.example @@ -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 diff --git a/package.json b/package.json index f1df3627db..cf49f8496b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/config.js b/src/config.js new file mode 100644 index 0000000000..4ca624acf4 --- /dev/null +++ b/src/config.js @@ -0,0 +1,3 @@ +const dotenv = require('dotenv'); + +dotenv.config();