- Install node packages with
npm install
- Install
mongodb
database for your OS
- Start the web-server with
npm start
- Navigate to http://localhost:3000 in your browser
- Start
ligthningd
withln-plugin-js
together, for example:lightningd --conf=YOUR_CONFIG --plugin=./plugin.js
- Connect or Disconnect with a peer node
- Refresh the page to see new entries from mongodb
By default the plugin only subscribes to connect
and disconnect
events from c-lightning.
These are defined in the config.json and can be expanded.
More info on events and other options can be found here.
This plugin can be expanded to do more than only waiting for events.
For example, it could define methods to be registered in the lightningd
daemon.