Running the example
Running the example
Running just an instance doesn't fully show you how the program behave, it needs at least 2 peers to connect to each other, that's why there are already multiple configuration files configured differently to let you connect two instances together.
You can run one instance by setting MithrilShards.Example.Node
as the startup project and run the launchSettings profile "node1" .
Then open a shell at the MithrilShards.Example.Node project path and run the command below
1 |
|
This would cause you to have a debuggable instance running with the configuration defined in forge-settings.json
file and another run running on the forge-settings2.json
configuration.
Alternatively you can run both instances, without a debugger (but you can attach later the process to Visual Studio) by running on two different shells:
1 2 |
|
The program running forge-settings.json contains the most verbose log level and you'll have the best experience if you install (or use a docker image) of Seq configured on the port specified in your configuration file (e.g. localhost:5341).
See SerilogShard for more details.
Here an example of the configuration file (forge-settings.json)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
Some Screenshots
Here a screenshot that shows the content of the shell when running the node with settings = forge-settings.json
You can access the Swagger UI by opening the address https://127.0.0.1:45020/docs/index.html
Here you can manipulate quotes using the Web API, or even manually attempt to connect to other peers using PeerManagement Connect action in the DEV area.
If you installed Seq, you can access the logs in a better way like shown here: