Skip to main content

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:

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.

  1. Navigate to the root directory:
cd integration-services
  1. Configure the API:
npx @iota/[email protected] 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ā€‹

  1. Move into the folder api/ssi-bridge.
  2. 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
  1. To check if the service started run in your terminal:
curl http://localhost:3001/info

Set up the Audit-Trail Gatewayā€‹

  1. Move into the folder api/audit-trail-gw.
  2. 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
  1. 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