Installation

Preparation

Before installing the project, check that you have the following prerequisites:

Build

When all the prerequisites are met, we clone the code from GitHub:

git clone git@github.com:Suite5/rc-apps.git

then we change into the cloned repository (cd rc-apps), and run:

yarn

to install the npm dependencies.

CLI

In addition to the NestJS CLI, a repo-specific cli tool is present, to assist developers in every-day tasks. This is available in the root of the project, and meant to be used from that directory. This can be done either directly:

$ ./cli.js

or using node (if, for some reason, doesn't find the node executable automatically):

$ node cli.js

Running ./cli.js -h will print a list of the available commands:

Usage: cli [options] [command]

Options:
  -V, --version                 output the version number
  -a, --app            application name (default: "develop")
  -h, --help                    display help for command

Commands:
  db:wipe [options]             drops all tables in the database
  db:seed                       seed the database
  db:seed:csv                   seed the database using a csv file
  generate:secret               generate a secret for generating secure tokens
  generate:keypair [options]    generate a public/private key pair to use when authenticating with an external service
  services:start                start external services needed for app development, using docker-compose
  services:stop                 stop external services needed for app development, using docker-compose
  services:reset [options]      stop running services and delete data
  migration:show                show all migrations and whether they have been run or not
  migration:run                 run all pending migrations
  migration:revert              revert last executed migration
  migration:generate [options]  generate a new migration file with the SQL needed to be executed to update the schema
  vault:status [options]        show the vault status
  vault:init [options]          initialise, unseal and configure vault
  vault:unseal [options]        unseal the vault, if sealed
  vault:seal [options]          seal the vault, if unsealed
  help [command]                display help for command