Fix README

This commit is contained in:
notplants 2021-12-18 18:36:07 -05:00
commit d3fb621ca9
4 changed files with 16 additions and 6 deletions

2
Cargo.lock generated
View File

@ -1051,7 +1051,7 @@ dependencies = [
[[package]]
name = "peach-dyndns-server"
version = "0.1.0"
version = "0.1.2"
dependencies = [
"clap-log-flag",
"clap-verbosity-flag",

View File

@ -1,6 +1,6 @@
[package]
name = "peach-dyndns-server"
version = "0.1.0"
version = "0.1.2"
authors = ["Michael Williams <michael.williams@enspiral.com>", "Max Fowler <notplants@mfowler.info>"]
edition = "2018"

View File

@ -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
```
# 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,
```
# this returns version of bind running

View File

@ -72,11 +72,9 @@ pub fn run() -> Result<(), BoxError> {
let http_server =
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)
.cors(DomainsValidation::AllowOnly(vec![
AccessControlAllowOrigin::Null,
]))
.cors(DomainsValidation::Disabled)
.start_http(
&http_server
.parse()