1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2025-02-14 21:10:32 +01:00

Minor changes to readme

This commit is contained in:
tim 2017-06-22 10:34:18 +02:00
parent 41eab7feab
commit 710ffbb487

View File

@ -17,21 +17,20 @@
## Contents ## Contents
* [Installation](#installation) * [Node.js Installation and Usage](#node.js-installation-and-usage)
* [Example: Create a transaction](#example-create-a-transaction) * [Example: Create a transaction](#example-create-a-transaction)
* [Browser Installation and Usage](#browser-installation-and-usage)
* [Documentation](#bigchaindb-documentation) * [Documentation](#bigchaindb-documentation)
* [Authors](#authors) * [Authors](#authors)
* [License](#license) * [License](#license)
## Node.js ## Node.js Installation and Usage
### Installation
```bash ```bash
npm install bigchaindb-driver npm install bigchaindb-driver
``` ```
#### Example: Create a transaction ### Example: Create a transaction
```js ```js
import * as driver from 'bigchaindb-driver' import * as driver from 'bigchaindb-driver'
@ -76,9 +75,7 @@ conn.postTransaction(txSigned)
.then((res) => console.log('Transaction status:', res.status)) .then((res) => console.log('Transaction status:', res.status))
``` ```
## Browser ## Browser Installation and Usage
### Installation and Usage
```html ```html
<!DOCTYPE html> <!DOCTYPE html>
@ -128,13 +125,11 @@ conn.postTransaction(txSigned)
conn.postTransaction(txSigned) conn.postTransaction(txSigned)
.then(() => conn.getStatus(txSigned.id)) .then(() => conn.getStatus(txSigned.id))
.then((res) => console.log('Transaction status:', res.status)) .then((res) => console.log('Transaction status:', res.status))
</script> // Check console for the transaction's status
</script>
</head> </head>
<body id="home"> <body id="home">
<h1>Hello BigchainDB</h1> <h1>Hello BigchainDB</h1>
</body> </body>
</html> </html>
``` ```