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 ...