pub struct Args {
    pub bind_addr: String,
    pub activitypub_url: String,
    pub database_url: String,
}
Expand description

Run the ActivityPub server partly implementing both C2S and S2S protocols, and a testing frontend. Can be configured via environment variables (real or ones from and .env file) and command line arguments. Command line arguments are prioritized.

Fields

bind_addr: String

the IP address and port to which the HTTP server is bound to. Can also be provided via the BIND_ADDR environment variable. E.g. “127.0.0.1:8000”.

activitypub_url: String

the base HTTPS URL used as the base of ActivityPub IDs, at which this server is served (hopefully via a reverse proxy). Can also be provided via the ACTIVITYPUB_URL environment variable. This cannot be changed without recreating the database, using a different one with an existing database will break things. E.g. "https://example.com".

database_url: String

a database url this server should use for accessing its database. Can also be provided via the DATABASE_URL environment variable. Must be a postgresql URL. E.g. “postgresql://fediverse_server_db”.

Trait Implementations

Construct the type from an input set of arguments. Read more
Get a String with just the argument names, e.g., options, flags, subcommands, etc, but without the values of the options and arguments. This can be useful as a means to capture anonymous usage statistics without revealing the content entered by the end user. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more