Commit Graph

8 Commits

Author SHA1 Message Date
51276d3831 Fix clippy warnings and Readme 2021-08-12 15:48:02 +02:00
78d147344f Add hint to readme 2021-08-12 15:48:02 +02:00
ec47e02f9c move README to toplevel 2021-08-12 15:48:02 +02:00
fc9b18141f Working user and link list, (big)restructure
This is now a workspace consisting of:
  * the pslink app (a wasm frontend for the admin interface)
  * the pslink binary
  * shared - modules for communication between the two above.
2021-08-12 15:48:02 +02:00
453cccde8b
Improve Readme 2021-03-27 11:09:41 +01:00
5218efe551 password hashes should stop appearing in logs 2021-03-27 07:37:59 +01:00
23fa296ceb
Add README.md 2021-03-09 14:07:05 +01:00
9512807eb3
Add command line interface
Add a command line interface to the binary and remove parts
that were hardcoded.

new --help is:

```
pslink 0.1.0
Dietrich <dietrich@teilgedanken.de>
A simple webservice that allows registered users to create short links including qr-codes.
Anyone can visit the shortened links. This is an ideal setup for small busines or for publishing papers.

USAGE:
    pslink [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --db <database>              The path of the sqlite database [env: PSLINK_DATABASE=]  [default: links.db]
    -i, --hostip <internal_ip>       The host (ip) that will run the pslink service [env: PSLINK_IP=]  [default:
                                     localhost]
    -p, --port <port>                The port the pslink service will run on [env: PSLINK_PORT=]  [default: 8080]
    -t, --protocol <protocol>        The protocol that is used in the qr-codes (http results in slightly smaller codes
                                     in some cases) [env: PSLINK_PROTOCOL=]  [default: http]  [possible values: http,
                                     https]
    -u, --public-url <public_url>    The host url or the page that will be part of the short urls. [env:
                                     PSLINK_PUBLIC_URL=]  [default: localhost:8080]
        --secret <secret>            The secret that is used to encrypt the password database keep this as inacessable
                                     as possible. As commandlineparameters are visible to all users it is not wise to
                                     use this as a commandline parameter but rather as an environment variable. [env:
                                     PSLINK_SECRET=]  [default: ]

SUBCOMMANDS:
    runserver           Run the server
    create-admin        Create an admin user.
    generate-env        Generate an .env file template using default settings and exit
    migrate-database    Apply any pending migrations and exit
    help                Prints this message or the help of the given subcommand(s)
```
2021-03-07 19:14:34 +01:00