Creating the /register-node endpoint 

The /register-node will be the next endpoint that we'll add to our network. This is defined as follows: 

app.post('/register-node', function (req, res) {});

This endpoint will register a node with the network.

Get Learn Blockchain Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.