ruma / homeserver

A Matrix homeserver written in Rust.
https://www.ruma.io/
1.08k stars 41 forks source link

Add sample config file to repository #150

Open farodin91 opened 7 years ago

farodin91 commented 7 years ago

This sample file should contain all possible properties and a documentation for all properties. The values for the sample file could default values or examples.

bind_address: "127.0.0.1"
bind_port: 3000
#postres_url: "postgres://user:password@address:port/database_name"
jimmycuadra commented 7 years ago

Can you add a description to this issue to explain what you mean, exactly? I'm not sure what a "default" config file would look like since most of the configuration fields are required and Ruma can't possibly know what their values should be.

farodin91 commented 7 years ago

The orignal idea was to add a function to the main. This function generate at a given position a sample config with example values. The advantage of this is automate update by adding parameter to Config.

nikhiljha commented 6 years ago

A lot of projects (most?) have a config file provided in the repository with a list of all possible options, set to something arbitrary. Some projects even have inline documentation as comments in this file, so you never have to open a browser past the first git clone.

To configure the application, all someone would have to do is

cp ruma.example.json ruma.json
(your favorite editor) ruma.json

instead of looking through the readme.md and then copy pasting the example snippet from there.