To start the project, download and use npm install
in the root folder to install the dependencies.
Use the .sample-env
file as a template for the .env
file.
The app uses Auth0 for authentication, so add your keys for this into .env
.
AUTH0_CLIENT_ID={your Auth0 ID}
AUTH0_CLIENT_SECRET={your Auth0 Secret}
AUTH0_CLIENT_DOMAIN={your Auth0 Domain URL}
Postgres is currently the only storage option configured to run directly with the app, via sequelize
.
sudo -u postgres createuser $DATABASE_USER
sudo -u postgres psql
ALTER USER $DATABASE_USER PASSWORD '$DATABASE_PASS';
sudo -u postgres createdb $DATABASE_NAME
DATABASE_URL=postgres://user:pass@host:5432/db
When you need to alter the database, create a migration file like this:
npm run db:migration:make
git add storage/migrations/{ timestamp }-{ migration-name }-migration.js
Then modify the up
/down
functions inside the migration file to modify the database.
GOOGLE_MAPS_API_KEY={your key}
GOOGLE_ANALYTICS_TRACKINGID={your tracking ID}
Run the server with npm start
. After a few seconds, the server should be up and running and give you the access URLs for your app.
Test coverage can be managed by maintaining various files like *.test.js
or test/*.js
throughout the codebase, using Enzyme Shallow and Jasmine to test components.