Skip to content

Development

Davide Miceli edited this page Jan 28, 2019 · 1 revision

Development and testing

Start dockerized environment for testing

At first, is required to start a dockerized environment for testing. To do this, run:

git clone https://github.com/davidemiceli/chainode.git
cd chainode/
DB=couchbase npm run start-dev-env
docker exec -it nodejs npm install
npm run create-dev-topics
npm run init-db

To close the dockerized environment:

npm run stop-dev-env

Run unit tests

After dockerized environment is started, run unit tests:

docker exec -it nodejs npm test

Manual testing

docker exec -it nodejs /bin/bash -c "CONFIGS=/app/test/configs/generic.json npm start"

Web Console

The first time, install all required packages:

docker exec -it nodejs /bin/bash -c "cd web-console/frontend && npm install"

Then, to build the frontend type:

for development mode

docker exec -it nodejs build-webconsole-dev

for production

docker exec -it nodejs build-webconsole-prod
Clone this wiki locally