Git Product home page Git Product logo

21bitroute's Introduction

How to run and publish Bitroute

Step 1

Get the latest version of the 21 software. You should be at version 2.3.1.

$ 21 update
$ 21 --version
21 v2.3.1

Step 2

Clone the Bitroute repository and make sure you have got traceroute installed.

$ git clone https://github.com/21dotco/bitroute.git
$ cd bitroute
$ sudo pip3 install -r requirements.txt
$ sudo apt-get install traceroute

Step 3

Join the 21market Marketplace, and start a local server to accept Bitroute requests. The server will run in the background and process requests. You can optionally edit the file to change the default price, which is 1000 Satoshis per request.

$ 21 join 21market
$ python3 bitroute-server.py &

Step 4

Now use 21 publish to submit the manifest file describing the Bitroute service you just started. You can pass in arguments to override the default values in the file. The name and email should be your own. The price field should match the price in the @payment.required decorator in bitroute-server.py. The host of 'AUTO' is a special input that tells the publish command to use the IP of your bitcoin computer within the 21market Marketplace (see [here](https://21.co/learn/21-marketplace/#the-21-network for details)). The port of 6003 is the default port specified within the bitroute-server.py code that you are running.

$ 21 publish submit manifest.yaml -p 'name="Joe Smith" email="[email protected]" price="1000" host="AUTO" port="6003"'

Step 5

After a brief wait of a second or so, you should be able to use 21 publish list to see the endpoint you just put up:

$ 21 publish list

You can also search the 21 Marketplace for your app:

$ 21 search "Bitroute"

Step 6

You can now use bitcoin to buy that endpoint from yourself to test it out:

$ 21 buy $HOST:$PORT/?uri=google.com

where $HOST is your Bitcoin Computer's IP address on the 21 Marketplace and $PORT is the port the web service is running on.

Step 7

And you can see a receipt for this transaction:

$ 21 log

21bitroute's People

Contributors

wbnns avatar harding avatar phillrob avatar wbinns avatar thamaranth avatar jagranata avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.