Skip to Content
Foundations of Blockchain
book

Foundations of Blockchain

by Koshik Raj
January 2019
Beginner to intermediate
372 pages
11h 17m
English
Packt Publishing
Content preview from Foundations of Blockchain

Executing and deploying the application

The server side of the application is executed by running the Python web server application. The server application can be executed on any blockchain node or on any machine that has access to the blockchain JSON-RPC server. The main function of the application instantiates a web server application at the specified port, as follows:

if __name__ == '__main__':    """main function to serve the api"""    server = Server() 
    server.app.run(host='0.0.0.0', port=port, debug=True) 

The user can access the REST interface once the server has been instantiated successfully. Let's publish and verify the existence of a document using the REST endpoints.

Let's use the curl tool to invoke the /publish POST method, which runs ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Blockchain Basics

Blockchain Basics

Daniel Drescher
What Is Blockchain?

What Is Blockchain?

Sir John Hargrave, Evan Karnoupakis
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey

Publisher Resources

ISBN: 9781789139396Supplemental Content