-
Notifications
You must be signed in to change notification settings - Fork 2
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.
- 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
branchgit 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 theDATABASE_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 runningheroku 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 withnpm start
Basic setup should be complete at this point, though issues are always possible