Clone the Github repository to your local filesystem
git clone https://github.com/ChakshuGautam/cQube-POCs.git
Change your current directory to the cloned repository
cd cQube-POCs
Start the Docker Network and the Instances
docker-compose up -d
This creates the cqube-pocs
network and instances of timescaledb
, graphql-engine
and pgbool
images.
Once this is done change your current directory to impl/c-qube
cd impl/c-qube
Create the environment (.env
) file for connecting to the timescaledb
docker instance.
touch .env
echo "DATABASE_URL="postgres://timescaledb:postgrespassword@localhost:5432/postgres?sslmode=disable"" > .env
Install all the necessary yarn
dependencies (while staying within the impl/c-qube
folder)
yarn install
You can use the build command in case you would like to build the Nest project.
yarn build
Now that we have our yarn dependencies installed we can go ahead and run migrations to migrate our schemas to our locally running docker database instance (while staying within the impl/c-qube
folder).
npx prisma migrate dev
Tests can be run in order to check for breaking or unintentional changes in the code by running the following command.
yarn test
Similarly the developer can also test the percentage of code coverage that the current testing suite provides via the following command.
yarn test:cov