a solidity and nodejs smart contract framework
BC_API="http://localhost:8545" // ganache route on local
docker build -t choozie-eth .
keep in mind that the last argument for development is "npm run dev" this will expose the dev environment on port 4200
docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
docker run --name dev-choozie -it -v $(pwd):/home/choozie/ -p 4200:4200 choozie-eth "npm run dev"
the ganche-cli(our localblockchain) is already isntalled inside de docker container, run it with:
docker exec -it dev-choozie /bin/bash ganache-cli
if there's an error passing the ganache-cli argument, split this step into 2
1.- get into the Docker container:
docker exec -it dev-choozie /bin/bash
2.- run ganache cli inside
ganache-cli
, do not close this window because is the local blockchain running!
Once installed Truffle will run the tests automatically and the migrations (deploy to the blockchain)
you can run int on the folder once the container is up with npm run test
and npm run migrate-contracts
user/register user/login
sm/{type}/sign sm/{type}/transfer sm/{type}/fee sm/{type}/withdraw
Truffle runs a integrated testing environment, run truffle test on local machine or ntinpm run test for dockerized test