- Install git and clone this repository using
git clone https://github.com/evan10s/drive-safe.git
- Install node.js on your computer. This should also install a package manager called npm.
- Open a terminal in this directory. Then run
npm install
a. Windows only: When the packagegyp
is installed, you might get an error aboutMSBUILD
. If this happens, follow these instructions: chjj/pty.js#60 (comment) - See the Setting up .env section below for details on environment variables required
- Install MongoDB, and if desired, MongoDB Compass
- Start MongoDB on your computer
- You can run the app locally by running
npm start
- Access your local instance by going to localhost:3000 in your browser.
- Copy .env.example to a new file called .env
- Fill in the values as necessary to provide a value for all the required environment variables
Name | Expected value |
---|---|
SESSIONS_SECRET_KEY | String of 50 letters, numbers, or symbols to use as a secret key for sessions |
DB_CONNECTION_STRING | MongoDB connection string; if running locally, the default value in .env.example should work |
PROD=false | True for a production instance; false for a development instance |
AUTOMATIC_CLIENT_ID | Client ID for authentication using Automatic |
AUTOMATIC_CLIENT_SECRET | Client secret for authentication using Automatic |
All development work should happen off in a branch off the master
branch. Once you're finished, create a pull request to merge your branch into master.
- The master branch auto-deploys to https://drive-safe-staging.herokuapp.com/
- To deploy to the production site, access the Heroku pipeline and promote the staging build to production