Scripting
Last updated
Last updated
So to get started with the hello-exchange server script, first we are going to need to make the actual script that will be run:
Create a new file called script.js
, in the same directory as the config.json
(plugins/src/plugins/hello-exchange/server/script.js
)
Fill this script.js
with the code found in the box below.
Check the screenshot below to compare and make sure you have the file in the correct location.
Now we have constructed 'hello-plugin', let's call the endpoint. First, we will need to build the plugin.
If the terminals from earlier (when following how to set up dev mode) are no longer up, lets first get them going.
In one terminal navigate to hollaex-kit/server and run docker-compose up
In the other, enter the docker container with: docker exec -it server_hollaex-kit-server_1 /bin/bash
With both the containers running build the plugin by running: node plugins/dev.js --plugin=hello-plugin
inside the container (terminal we ran 'docker exec...' in)
Great news! This is all we had to do, and can now have a look at the plugin in the browser through the following URL:
http://localhost:10013/plugins/hello-plugin/info
You should see an output similar to below: