Install package dependencies for both the ./server
and ./client
:
npm install
Installing dependencies automatically calls the preinstall
script, which installs the dependencies in their appropriate folders.
This application requires a MongoDB document-oriented database.
Please goto https://mongodb.com/ to register for your own database.
Both the ./server
and ./client
directories must contain .env
files in order to connect to your database, sign and verify JSON Web Tokens for user authentication and to send emails for user registration and password update confirmation.
Please refer to the ./server/.envTemplate
file to see the key/value pairs that must be included in ./server/.env
:
#
# Components of the database URL with embedded credentials. Special characters must be URL encoded.
#
# Example:
#
# DB_PASSWORD = "password12345"
# DB_PATH = "ballotbox.mongodb.net/params"
# DB_PROTOCOL = "mongodb+srv"
# DB_USERNAME = "ballotbox"
#
DB_PASSWORD = ""
DB_PATH = ""
DB_PROTOCOL = ""
DB_USERNAME = ""
#
# Private key for signing and verifying JSON Web Tokens.
#
# Example:
#
# JWT_PRIVATE_KEY = "abc123def456ghi789"
#
JWT_PRIVATE_KEY = ""
#
# Configuration of the outgoing email.
#
# Example:
#
# EMAIL_ADDRESS = "account@gmail.com"
# EMAIL_HOST = "smtp.gmail.com"
# EMAIL_NAME = "Ballot Box"
# EMAIL_PASSWORD = "12345"
# EMAIL_SERVICE = "gmail"
#
EMAIL_ADDRESS = ""
EMAIL_HOST = ""
EMAIL_NAME = ""
EMAIL_PASSWORD = ""
EMAIL_SERVICE = ""
Please refer to the ./client/.envTemplate
file to see the key/value pairs that must be included in ./client/.env
:
#
# JSON Web Token authorization for development environment
#
# Example:
#
# REACT_APP_DEV_JWT = "abc123def456ghi789"
#
REACT_APP_DEV_JWT = ""
Run the server and/or client from the root directory to test your code:
npm run server
npm run client
GNU General Public License v3.0
Copyright © 2020 Geoffrey Mattie