Skip to content

Getting Started

Anatolij Grigorjev edited this page May 2, 2018 · 9 revisions

The are 2 versions of the CryptX system housed in this repository. These are conventionally separated into a production build housed on the branch master and a staging build housed on the branch staging.
These are called cryptx-app and cryptx-app-staging by Heroku respectively.

The instructions below work for either app in steps where a specific branch name or a specific Heroku app name are required. For safety reasons, these are written from the perspective of the staging app.

To get started:

  • Install the Node runtime for your system from https://nodejs.org/en/
  • Install the Heroku CLI tools at https://devcenter.heroku.com/articles/heroku-cli
  • Install and start a local PostgreSQL database (some instructions here: https://www.postgresql.org/download/)
  • Clone the code repository to a folder of choice git clone https://github.com/twentythirty/CryptX.git
  • Got to the cloned folder, as the following commands are issued within it (cd CryptX).
  • Switch to the staging branch git checkout staging for prosperity.
  • Perform the Heroku CLI login steps heroku login
  • Get Heroku information on the app to confirm via heroku info -a cryptx-app-staging
  • Add Heroku keys via heroku keys:add
  • Run npm install
  • Copy the repository file test.env with the name .env. This file is setup to be ignored by the VCS and can be used to give local values to app configuration parameters
  • In the file .env, replace the DATABASE_URL key value with your own local PostgresSQL database URL. If you are working with the staging DB, the proper URL can be obtained by looking at the current app parameters (by running heroku config -a cryptx-app-staging). Rule of thumb is to use a local DB in any situation where you don't have to risk changing the remote.
  • Run system tests via npm test. If all is well, the system should be able to start properly with npm start

Basic setup should be complete at this point, though issues are always possible

Clone this wiki locally