Local Setup
This section will guide you in setting up the Integration Services API using node.js. It is mainly relevant for developers who want to contribute to the project or create a project fork.
Requirementsā
Please make sure to have the following dependencies installed before moving forward:
- node.js min. v16.17.0
- docker
- docker-compose
- Git
Download the Projectā
Freshly clone the project by running the following command:
git clone https://github.com/iotaledger/integration-services.git
Configure APIā
Use the Integration Services CLI to configure the API. The CLI configures your .env
and mongo-init.json
files.
- Navigate to the root directory:
cd integration-services
- Configure the API:
npx @iota/is-cli@latest setup-node
Start the MongoDBā
Now you can start docker-compose in the same root directory to setup your mongo database.
docker-compose up -d mongo
This must only be run once to start the MongoDB you can always check if the MongoDB container is running by running docker ps
which should generate a similar output as:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f15ab2571369 mongo:latest "docker-entrypoint.sā¦" 7 weeks ago Up 7 weeks 0.0.0.0:27017->27017/tcp, :::27017->27017/tcp api_mongo_1
Setup SSI-Bridgeā
- Move into the folder
api/ssi-bridge
. - Run the following commands to install dependencies, build the project, set up the API, and finally start the SSI-Bridge:
npm install
npm run setup-api
npm run start
- To check if the service started run in your terminal:
curl http://localhost:3001/info
Set up the Audit-Trail Gatewayā
- Move into the folder
api/audit-trail-gw
. - Run the following commands to install dependencies, build the project, set up the API, and finally start the Audit-Trail Gateway:
npm install
npm run setup-api
npm run start
- To check if the service started run in your terminal:
curl http://localhost:3002/info
FAQā
I accidentally stopped the mongo db container (the database cannot be reached) can I start it again?
Yes, the container can be started again by running docker start <container-id>
-> The container id can be found by running docker ps -a