Fix README
This commit is contained in:
commit
d3fb621ca9
|
@ -1051,7 +1051,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "peach-dyndns-server"
|
name = "peach-dyndns-server"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap-log-flag",
|
"clap-log-flag",
|
||||||
"clap-verbosity-flag",
|
"clap-verbosity-flag",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "peach-dyndns-server"
|
name = "peach-dyndns-server"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
authors = ["Michael Williams <michael.williams@enspiral.com>", "Max Fowler <notplants@mfowler.info>"]
|
authors = ["Michael Williams <michael.williams@enspiral.com>", "Max Fowler <notplants@mfowler.info>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|
12
README.md
12
README.md
|
@ -32,6 +32,18 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method"
|
||||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "is_domain_available", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002
|
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "is_domain_available", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# register_domain
|
||||||
|
```
|
||||||
|
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "register_domain", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002
|
||||||
|
```
|
||||||
|
|
||||||
|
# is_domain_available
|
||||||
|
```
|
||||||
|
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "is_domain_available", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test peach-bind9 is running,
|
test peach-bind9 is running,
|
||||||
```
|
```
|
||||||
# this returns version of bind running
|
# this returns version of bind running
|
||||||
|
|
|
@ -72,11 +72,9 @@ pub fn run() -> Result<(), BoxError> {
|
||||||
let http_server =
|
let http_server =
|
||||||
env::var("PEACH_DYNDNS_SERVER").unwrap_or_else(|_| "127.0.0.1:3001".to_string());
|
env::var("PEACH_DYNDNS_SERVER").unwrap_or_else(|_| "127.0.0.1:3001".to_string());
|
||||||
|
|
||||||
info!("Starting JSON-RPC server on {}.", http_server);
|
info!("Starting JSON-RPC server on {}", http_server);
|
||||||
let server = ServerBuilder::new(io)
|
let server = ServerBuilder::new(io)
|
||||||
.cors(DomainsValidation::AllowOnly(vec![
|
.cors(DomainsValidation::Disabled)
|
||||||
AccessControlAllowOrigin::Null,
|
|
||||||
]))
|
|
||||||
.start_http(
|
.start_http(
|
||||||
&http_server
|
&http_server
|
||||||
.parse()
|
.parse()
|
||||||
|
|
Loading…
Reference in New Issue