Clone and install dependencies in both the root directory and in client/
:
$ git clone https://github.com/codefordenver/Comrad.git
# ...
$ cd Comrad/
$ npm ci
# ...
$ cd client/
$ npm ci
# ...
Note the use of the npm ci
command instead of install
: this installs the exact package versions specified in package-lock.json
rather than the fuzzy-matched versions in package.json
, thus giving you a more exact replica of the dependencies and avoiding much confusion.
Copy the file at client/.env-sample
to client/.env
. Edit the client/.env
file and change the REACT_APP_API_SERVER_URL
value to http://localhost:5000
Copy the file at .env-sample
to .env
. Change the following variables:
MONGO_URI
: Set to the connection string of a local Mongo DBSECRET_KEY
: Set to a random string of letters/numbers. Used to encode sessions.USE_SECURE_COOKIES
: Change tofalse
- If you're testing any email functionality, you'll set
MAIL_HOST
,MAIL_PORT
,MAIL_USER
, andMAIL_PASS
to values for an email provider like Mailtrap or Mailgun. Please contact info@getcomrad.org if you'd like to use our development credentials for this.
Now, we'll seed the development database with test data. Follow the instructions here to seed the database.
Now, the project can be run locally with npm run dev