From 2d5050390b7f0923d57ec2b5f255273bcc69e7cb Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 26 Aug 2021 10:03:19 -0700 Subject: [PATCH] add developing instructions --- README.md | 27 +++++++++++++++++++++++++++ packages/api/package.json | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..ee78009f --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# Community-Based Organization Operations Suite (CBO Suite) + +The CBO Suite is a case-management web application that enables CBOs and members of CBOs to work together more effectively. + +## Developing + +### Prerequisites + +- NodeJS LTS Release +- Yarn v1 global installation (`npm i -g yarn`) +- docker-compose OR a MongoDB connection string defined in the environment variable `DB_CONNECTION_STRING` + +To begin developming the app locally: + +If `DB_CONNECTION_STRING` environment variable is defined: + + > yarn build:schema + > yarn start: + +If using **docker-compose** + + -- Shell 1 -- + > yarn build:schema + > yarn start:api:local + + -- Shell 2 -- + > yarn start:webapp diff --git a/packages/api/package.json b/packages/api/package.json index 04b351fb..9e4a48c1 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -6,8 +6,9 @@ "scripts": { "clean": "essex clean dist/ deploy.zip", "start": "nodemon src/index.ts", + "start_local": "docker-compose up -d && yarn start", "start:api": "yarn start", - "start:local": "docker-compose up -d && nodemon src/index.ts", + "start:api:local": "yarn start_local", "build": "run-s clean compile write_deploy_package", "build:api": "yarn build", "archive": "run-s install_deploy_deps create_deploy_archive",