mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Change server port to 9984
This commit is contained in:
parent
ac3ce3b6fa
commit
06f45f1dc7
@ -1,9 +1,17 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
|
# from functools import reduce
|
||||||
|
# PORT_NUMBER = reduce(lambda x, y: x * y, map(ord, 'BigchainDB')) % 2**16
|
||||||
|
# basically, the port number is 9984
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
'server': {
|
'server': {
|
||||||
'bind': '0.0.0.0:5000',
|
# Note: this section supports all the Gunicorn settings:
|
||||||
|
# - http://docs.gunicorn.org/en/stable/settings.html
|
||||||
|
'bind': '0.0.0.0:9984',
|
||||||
|
'workers': None, # if none, the value will be cpu_count * 2 + 1
|
||||||
|
'threads': None, # if none, the value will be cpu_count * 2 + 1
|
||||||
},
|
},
|
||||||
'database': {
|
'database': {
|
||||||
'host': 'localhost',
|
'host': 'localhost',
|
||||||
@ -20,7 +28,7 @@ config = {
|
|||||||
'port': 8125,
|
'port': 8125,
|
||||||
'rate': 0.01,
|
'rate': 0.01,
|
||||||
},
|
},
|
||||||
'api_endpoint': 'http://localhost:8008/api/v1',
|
'api_endpoint': 'http://localhost:9984/api/v1',
|
||||||
'consensus_plugin': 'default',
|
'consensus_plugin': 'default',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,9 @@ def create_server(settings):
|
|||||||
if not settings.get('workers'):
|
if not settings.get('workers'):
|
||||||
settings['workers'] = (multiprocessing.cpu_count() * 2) + 1
|
settings['workers'] = (multiprocessing.cpu_count() * 2) + 1
|
||||||
|
|
||||||
|
if not settings.get('threads'):
|
||||||
|
settings['threads'] = (multiprocessing.cpu_count() * 2) + 1
|
||||||
|
|
||||||
debug = settings.pop('debug', False)
|
debug = settings.pop('debug', False)
|
||||||
app = create_app(debug)
|
app = create_app(debug)
|
||||||
standalone = StandaloneApplication(app, settings)
|
standalone = StandaloneApplication(app, settings)
|
||||||
|
@ -90,4 +90,7 @@ environ variable you need to use colon (`:`) as separator.
|
|||||||
- BIGCHAINDB_STATSD_RATE
|
- BIGCHAINDB_STATSD_RATE
|
||||||
- BIGCHAINDB_API_ENDPOINT
|
- BIGCHAINDB_API_ENDPOINT
|
||||||
- BIGCHAINDB_CONSENSUS_PLUGIN
|
- BIGCHAINDB_CONSENSUS_PLUGIN
|
||||||
|
- BIGCHAINDB_SERVER_BIND
|
||||||
|
- BIGCHAINDB_SERVER_WORKERS
|
||||||
|
- BIGCHAINDB_SERVER_THREADS
|
||||||
```
|
```
|
||||||
|
@ -2,10 +2,15 @@
|
|||||||
|
|
||||||
When you start Bigchaindb using `bigchaindb start`, an HTTP API is exposed at:
|
When you start Bigchaindb using `bigchaindb start`, an HTTP API is exposed at:
|
||||||
|
|
||||||
[http://localhost:5000/api/v1/](http://localhost:5000/api/v1/)
|
- [http://localhost:9984/api/v1/](http://localhost:9984/api/v1/)
|
||||||
|
|
||||||
Right now, that API can only be accessed from localhost (i.e. not remotely). In the future, we'll enable remote access and explain how that works. See [Issue #149](https://github.com/bigchaindb/bigchaindb/issues/149) on GitHub.
|
|
||||||
|
|
||||||
The HTTP API currently exposes two endpoints, one to get information about a specific transaction id, and one to push a transaction to the BigchainDB cluster. Those endpoints are documented at:
|
Please note that by default the server binds to `0.0.0.0:9984`, hence the API
|
||||||
|
is exposed to the world.
|
||||||
|
|
||||||
|
The HTTP API currently exposes two endpoints, one to get information about a
|
||||||
|
specific transaction id, and one to push a transaction to the BigchainDB
|
||||||
|
cluster. Those endpoints are documented at:
|
||||||
|
|
||||||
|
- [http://docs.bigchaindb.apiary.io/](http://docs.bigchaindb.apiary.io/)
|
||||||
|
|
||||||
[http://docs.bigchaindb.apiary.io/](http://docs.bigchaindb.apiary.io/)
|
|
||||||
|
@ -94,10 +94,16 @@ $ rethinkdb
|
|||||||
|
|
||||||
Then open a different terminal and run:
|
Then open a different terminal and run:
|
||||||
```text
|
```text
|
||||||
$ bigchaindb start
|
$ bigchaindb init
|
||||||
```
|
```
|
||||||
|
|
||||||
During its first run, BigchainDB Server takes care of configuring a single node environment.
|
During its first run, the command takes care of configuring a single node environment.
|
||||||
|
|
||||||
|
|
||||||
|
After configuring the node, you can start it with:
|
||||||
|
```text
|
||||||
|
$ bigchaindb start
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Run BigchainDB with Docker
|
## Run BigchainDB with Docker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user