Adding webapps router

This commit is contained in:
Tomasz Drwięga
2016-04-07 12:10:26 +02:00
parent 5d6ca1498e
commit ad37b7fd2a
7 changed files with 233 additions and 102 deletions

View File

@@ -132,7 +132,7 @@ API and Console Options:
interface. APIS is a comma-delimited list of API
name. Possible name are web3, eth and net.
[default: web3,eth,net,personal].
-w --webap Enable the web applications server (e.g. status page).
-w --webapp Enable the web applications server (e.g. status page).
--webapp-port PORT Specify the port portion of the WebApps server
[default: 8080].
@@ -305,7 +305,10 @@ fn setup_rpc_server(
fn setup_webapp_server(
url: &str
) -> Option<Arc<PanicHandler>> {
use rpc::v1::*;
let server = webapp::WebappServer::new();
server.add_delegate(Web3Client::new().to_delegate());
Some(server.start_http(url, ::num_cpus::get()))
}