Add the Flags to Doku

master
kreativmonkey 7 years ago
parent 1a1ae9ca74
commit c0765a1e48

@ -11,6 +11,20 @@ Sgot is a lightwaight, self-hostable open-source link shortening web application
- [ ] Delete URL
- [ ] Login
## Installation
Clone the Repository and build the Application by using `go build .`
Start Sgot by the following commant `./sgot &`
| Flag | Usage | Default |
| -------- | -------------------------------------- | ------------------------------------ |
| -host | setup the host to listen on | localhost |
| -port | Setup the port to listen on | 6889 |
| -apikey | Define the key to connect with the API | "thisIsNotASecretTokenNow" |
| -db-file | Setup the DB file to use | ./sgot.db |
| -title | Service title | Sgot |
| -domain | Domain for the redirection link | The domain your service is available |
## API
To authenticate a user to Polr, you will need to provide an API key along with each request to the Polr API, as a GET or POST parameter. (e.g ``?key=API_KEY_HERE``)

@ -13,7 +13,6 @@ func DefaultConfig() Config {
Host: "localhost",
Port: "6889",
Title: "Sgot",
CheckDomain: false,
}
}
@ -55,7 +54,6 @@ func readConfig(f *flag.FlagSet, args []string) (*Config, error){
f.StringVar(&config.DB, "db-file", config.DB, "The db file to use")
f.StringVar(&config.Domain, "domain", config.Domain, "The domain for redirect links")
f.StringVar(&config.Title, "title", config.Title, "The title on the Front")
f.BoolVar(&config.CheckDomain, "check-domain", config.CheckDomain, "Do you want to check Domain? Default:")
// Arguments variables
err = f.Parse(args)

Loading…
Cancel
Save