Server Configuration for ripple-rest
August 7, 2015 ยท View on GitHub
This document tracks all changes to the config.json format. If a new version is released the details will be updated here.
An example configuration file is provided here.
Version 2.0.3
Changes
- Add
proxyproperty that provides ripple-lib with a proxy url to route websocket connections to rippled through
{
'config_version': '2.0.3',
'debug': false,
'port': 5990,
'host': 'localhost',
'ssl_enabled': false,
'ssl': {
'key_path': './certs/server.key',
'cert_path': './certs/server.crt'
},
'db_path': './ripple-rest.db',
'max_transaction_fee': 1000000,
'proxy': 'http://username:password@0.0.0.0:3128'
'rippled_servers': [
'wss://s1.ripple.com:443'
],
'url_base': 'https://api.ripple.com:443'
}
config_version- will be checked by the configuration loader and it will throw an error if there have been breaking changes to the formatport- the port that the API server will be available onhost- the host the API server will be available ondp_path- path for sqlite3 to save the database to. Can be populated with:memory:to run an in-memory version of the sqlite dbssl_enabled- boolean to configure to server to host over SSLssl- if an object withkey_pathandcert_pathare provided, the API server will be available over HTTPSmax_transaction_fee- the maximum fee you're willing to pay for a transaction, has to be aNumberrippled_servers- an array of server objects indicating whichrippledservers the API should connect to. These should be configured to point to your localrippledif you are running one, instead ofs_west.ripple.comproxy- the url of a proxy server. Connections to the rippled_servers will be routed through heredebug- boolean to log debugging informationurl_base- override the url base (protocol://host_name:port) that is used in url construction for rest responses
Version 2.0.2
Changes
- Add
url_baseproperty to override the url base (protocol://host_name:port) that is used in url construction for rest responses- e.g.
'url_base': 'https://api.ripple.com'will yield a transaction status url ofhttps://api.ripple.com/v1/accounts/{account}/payments/{hash}
- e.g.
{
'config_version': '2.0.2',
'debug': false,
'port': 5990,
'host': 'localhost',
'ssl_enabled': false,
'ssl': {
'key_path': './certs/server.key',
'cert_path': './certs/server.crt'
},
'db_path': './ripple-rest.db',
'max_transaction_fee': 1000000,
'rippled_servers': [
'wss://s1.ripple.com:443'
],
'url_base': 'https://api.ripple.com:443'
}
config_version- will be checked by the configuration loader and it will throw an error if there have been breaking changes to the formatport- the port that the API server will be available onhost- the host the API server will be available ondp_path- path for sqlite3 to save the database to. Can be populated with:memory:to run an in-memory version of the sqlite dbssl_enabled- boolean to configure to server to host over SSLssl- if an object withkey_pathandcert_pathare provided, the API server will be available over HTTPSmax_transaction_fee- the maximum fee you're willing to pay for a transaction, has to be aNumberrippled_servers- an array of server objects indicating whichrippledservers the API should connect to. These should be configured to point to your localrippledif you are running one, instead ofs_west.ripple.comdebug- boolean to log debugging informationurl_base- override the url base (protocol://host_name:port) that is used in url construction for rest responses
Version 2.0.1
Changes
- Add
max_transaction_feeproperty to set the maximum fee you're willing to pay for a transaction
{
'config_version': '2.0.1',
'debug': false,
'port': 5990,
'host': 'localhost',
'ssl_enabled': false,
'ssl': {
'key_path': './certs/server.key',
'cert_path': './certs/server.crt'
},
'db_path': './ripple-rest.db',
'max_transaction_fee': 1000000,
'rippled_servers': [
'wss://s1.ripple.com:443'
]
}
config_version- will be checked by the configuration loader and it will throw an error if there have been breaking changes to the formatport- the port that the API server will be available onhost- the host the API server will be available ondp_path- path for sqlite3 to save the database to. Can be populated with:memory:to run an in-memory version of the sqlite dbssl_enabled- boolean to configure to server to host over SSLssl- if an object withkey_pathandcert_pathare provided, the API server will be available over HTTPSmax_transaction_fee- the maximum fee you're willing to pay for a transaction, has to be aNumberrippled_servers- an array of server objects indicating whichrippledservers the API should connect to. These should be configured to point to your localrippledif you are running one, instead ofs_west.ripple.comdebug- boolean to log debugging information
Version 2.0.0
Changes
- All properties should be provided in lowercase
- Deprecated Postgres support, moved to sqlite3 only
- Removed
DATABASE_URLand addeddb_pathfor specifying the path for sqlite to save to - Optionally you can provide the
:memory:as the db_path to run an in-memory sqlite database
{
'config_version': '2.0.0',
'debug': false,
'port': 5990,
'host': 'localhost',
'ssl_enabled': false,
'ssl': {
'key_path': './certs/server.key',
'cert_path': './certs/server.crt'
},
'db_path': './ripple-rest.db',
'rippled_servers': [
'wss://s1.ripple.com:443'
]
}
config_version- will be checked by the configuration loader and it will throw an error if there have been breaking changes to the formatport- the port that the API server will be available onhost- the host the API server will be available ondp_path- path for sqlite3 to save the database to. Can be populated with:memory:to run an in-memory version of the sqlite dbssl_enabled- boolean to configure to server to host over SSLssl- if an object withkey_pathandcert_pathare provided, the API server will be available over HTTPSrippled_servers- an array of server objects indicating whichrippledservers the API should connect to. These should be configured to point to your localrippledif you are running one, instead ofs_west.ripple.comdebug- boolean to log debugging information
Version 0.0.2
Changes
- Added
debugoption
{
'config_version': '1.0.1',
'PORT': 5990,
'NODE_ENV': 'development',
'HOST': 'localhost',
'DATABASE_URL': 'postgres://ripple_rest_user:password@localhost:5432/ripple_rest_db',
'ssl': {
'key_path': './certs/server.key',
'cert_path': './certs/server.crt'
},
'rippled_servers': [
{
'host': 's_west.ripple.com',
'port': 443,
'secure': true
}
],
'debug': true
}
config_version- will be checked by the configuration loader and it will throw an error if there have been breaking changes to the formatPORT- the port that the API server will be available onNODE_ENV- eitherdevelopment,staging, orproductionHOST- the host the API server will be available onDATABASE_URL- the URL used to connect to the PostgreSQL databasessl- if an object withkey_pathandcert_pathare provided, the API server will be available over HTTPSrippled_servers- an array of server objects indicating whichrippledservers the API should connect to. These should be configured to point to your localrippledif you are running one, instead ofs_west.ripple.comdebug- boolean to log debugging information
Version 0.0.1
{
'config_version': '0.0.1',
'PORT': 5990,
'NODE_ENV': 'development',
'HOST': 'localhost',
'DATABASE_URL': 'postgres://ripple_rest_user:password@localhost:5432/ripple_rest_db',
'ssl': {
'key_path': './certs/server.key',
'cert_path': './certs/server.crt'
},
'rippled_servers': [
{
'host': 's_west.ripple.com',
'port': 443,
'secure': true
}
]
}
config_version- will be checked by the configuration loader and it will throw an error if there have been breaking changes to the formatPORT- the port that the API server will be available onNODE_ENV- eitherdevelopment,staging, orproductionHOST- the host the API server will be available onDATABASE_URL- the URL used to connect to the PostgreSQL databasessl- if an object withkey_pathandcert_pathare provided, the API server will be available over HTTPSrippled_servers- an array of server objects indicating whichrippledservers the API should connect to. These should be configured to point to your localrippledif you are running one, instead ofs_west.ripple.com