Explorer

definy.sync-remote-of

description
The remote server of definy_receive / definy_send (default https://definy-html-narumincho.fly.dev, the public definy server on fly.io)
type
Fn(arguments: @definy.json) -> String
expression
fn(arguments$0) =>
  let remote$1 = match @definy.json-get-string(value: $0, key: "remote") {
      #some(text$2) =>
        @definy.string-trim(value: $2),
      #none(_) =>
        ""
    };
  match @core.equal(left: $1, right: "") {
    true =>
      "https://definy-html-narumincho.fly.dev",
    false =>
      let length$3 = @core.string-length(value: $1);
      match @core.equal(left: @core.string-slice(value: $1, start: @core.minus(left: $3, right: 1), end: $3), right: "/") {
        true =>
          @core.string-slice(value: $1, start: 0, end: @core.minus(left: $3, right: 1)),
        false =>
          $1
      }
  }
visibility
public
definy.sync-remote-of (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: aKC4-8FZC_VBVtYVoAhS7r42Vnna7VezVMm5hgU3aFI
content hash: XZRUKaW6OemrNLh0aGtYHDtHy3LMDKq6K0bO53gwPfA